changeset 2566:2063ee669faf

Contribute eCosCentric's synthetic target framebuffer device driver.
author bartv
date Tue, 07 Oct 2008 21:10:17 +0000
parents f9d071633ee7
children d5681a2ca43c
files packages/devs/framebuf/synth/current/ChangeLog packages/devs/framebuf/synth/current/cdl/framebuf_synth.cdl packages/devs/framebuf/synth/current/doc/synth_framebuf.sgml packages/devs/framebuf/synth/current/doc/synthfb.png packages/devs/framebuf/synth/current/host/Makefile.am packages/devs/framebuf/synth/current/host/Makefile.in packages/devs/framebuf/synth/current/host/acinclude.m4 packages/devs/framebuf/synth/current/host/aclocal.m4 packages/devs/framebuf/synth/current/host/configure packages/devs/framebuf/synth/current/host/configure.in packages/devs/framebuf/synth/current/host/framebuf.c packages/devs/framebuf/synth/current/host/framebuf.tcl packages/devs/framebuf/synth/current/host/framebuf.tdf packages/devs/framebuf/synth/current/host/framebuf_icon.xbm packages/devs/framebuf/synth/current/host/framebuf_iconmask.xbm packages/devs/framebuf/synth/current/misc/example.c packages/devs/framebuf/synth/current/misc/example.ecm packages/devs/framebuf/synth/current/misc/example.tdf packages/devs/framebuf/synth/current/src/gen_synthfb.tcl packages/devs/framebuf/synth/current/src/protocol.h packages/devs/framebuf/synth/current/src/synthfb.c packages/devs/framebuf/synth/current/src/synthfb_init.cxx
diffstat 22 files changed, 11289 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/packages/devs/framebuf/synth/current/ChangeLog
@@ -0,0 +1,35 @@
+2008-10-06  Bart Veer  <bartv@ecoscentric.com>
+
+	* synthetic target framebuffer driver imported into anoncvs
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2008 Free Software Foundation, Inc.
+//
+// eCos 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.
+//
+// eCos 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 eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
new file mode 100644
--- /dev/null
+++ b/packages/devs/framebuf/synth/current/cdl/framebuf_synth.cdl
@@ -0,0 +1,256 @@
+# ====================================================================
+#
+#      framebuf_synth.cdl
+#
+#      Framebuffer device driver for the synthetic target.
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+# -------------------------------------------
+# This file is part of eCos, the Embedded Configurable Operating System.
+# Copyright (C) 2008 Free Software Foundation, Inc.
+#
+# eCos 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.
+#
+# eCos 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 eCos; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+#
+# As a special exception, if other files instantiate templates or use macros
+# or inline functions from this file, or you compile this file and link it
+# with other works to produce a work based on this file, this file does not
+# by itself cause the resulting work to be covered by the GNU General Public
+# License. However the source code for this file must still be made available
+# in accordance with section (3) of the GNU General Public License.
+#
+# This exception does not invalidate any other reasons why a work based on
+# this file might be covered by the GNU General Public License.
+# -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s):     bartv
+# Date:          2005-10-24
+#
+#####DESCRIPTIONEND####
+#========================================================================
+
+cdl_package CYGPKG_DEVS_FRAMEBUF_SYNTH {
+    display		"Synthetic Target Framebuffer device driver"
+    parent		CYGPKG_IO_FRAMEBUF
+    active_if		CYGPKG_IO_FRAMEBUF
+    hardware
+    include_files
+
+    description "
+        This package provides a framebuffer device driver for the
+        synthetic target."
+
+    for { set _fb 0 } { $_fb < 4 } { incr _fb } {
+        cdl_component CYGPKG_DEVS_FRAMEBUF_SYNTH_FB$_fb {
+            display	"Provide framebuffer device fb$_fb"
+            description "
+                The synthetic target framebuffer driver can provide up to
+                four framebuffer devices, named fb0 to fb3. Each device's
+                width, height, depth, and colour format can be controlled.
+                This option enables device fb$_fb"
+
+            flavor		    bool
+            default_value	[expr $_fb ? 0 : 1]
+            implements		CYGINT_IO_FRAMEBUF_DEVICES
+            implements		CYGHWR_IO_FRAMEBUF_FUNCTIONALITY_DOUBLE_BUFFER
+            requires		is_substr(CYGDAT_IO_FRAMEBUF_DEVICES, \" fb[set _fb] \")
+
+            cdl_option CYGNUM_DEVS_FRAMEBUF_SYNTH_FB[set _fb]_WIDTH {
+                display		"fb$_fb width"
+                flavor 		data
+                default_value	320
+                legal_values	16 to 4096
+            }
+
+            cdl_option CYGNUM_DEVS_FRAMEBUF_SYNTH_FB[set _fb]_HEIGHT {
+                display		"fb$_fb height"
+                flavor 		data
+                default_value	240
+                legal_values	16 to 4096
+            }
+
+            cdl_option CYGDAT_DEVS_FRAMEBUF_SYNTH_FB[set _fb]_FORMAT {
+                display		"fb$_fb format"
+                flavor		data
+                if { 0 } {
+                    legal_values	{ "1BPP_BE_PAL888"  "1BPP_LE_PAL888"
+                        "2BPP_BE_PAL888"  "2BPP_LE_PAL888"
+                        "4BPP_BE_PAL888"  "4BPP_LE_PAL888"
+                        "8BPP_PAL888"     "8BPP_TRUE_332"
+                        "16BPP_TRUE_565"  "16BPP_TRUE_555"
+                        "32BPP_TRUE_0888"
+                    }
+                } else {
+                    legal_values	{
+                        "8BPP_PAL888"     "8BPP_TRUE_332"
+                        "16BPP_TRUE_565"  "16BPP_TRUE_555"
+                        "32BPP_TRUE_0888"
+                    }
+                }
+                default_value	{ "8BPP_PAL888" }
+                if { 0 } {
+                    description "
+                        Each synthetic target framebuffer device can be configured
+                        to emulate a particular format. This consists of three fields:
+                        depth, endianness, and colour. The depth is in bits per pixel
+                        and can be 1bpp, 2bpp, 4bpp, 8bpp, 16bpp or 32bpp. The endianness
+                        is only relevant for 1bpp, 2bpp and 4bpp devices and affects how
+                        pixels are organized within each byte. Colour can be either
+                        paletted or true colour. 1bpp, 2bpp and 4bpp implies paletted, and
+                        16bpp and 32bpp implies true colour. 8bpp can be either paletted
+                        or true colour. For 1bpp the default palette is monochrome with
+                        colour 0 == black. For 2bpp the default palette is greyscale with
+                        colour 0 == black. For 4bpp the default palette is EGA. For 8bpp
+                        the default palette is VGA. The application can change these
+                        default palettes as required to match the hardware being emulated."
+                } else {
+                    description "
+                        Each synthetic target framebuffer device can be configured
+                        to emulate a particular format. This consists of two fields:
+                        depth and colour. The depth is in bits per pixel and can be
+                        8bpp, 16bpp or 32bpp. Colour can be either paletted or true colour.
+                        16bpp and 32bpp implies true colour. 8bpp can be either paletted
+                        or true colour. For 8bpp the default palette is VGA. The application
+                        can change these default palettes as required to match the hardware being emulated."
+                }
+            }
+
+            cdl_component CYGIMP_DEVS_FRAMEBUF_SYNTH_FB[set _fb]_VIEWPORT {
+                display		    "fb$_fb provides viewport support"
+                default_value	0
+                implements	    CYGHWR_IO_FRAMEBUF_FUNCTIONALITY_VIEWPORT
+                description "
+                    Optionally framebuffer device $_fb can support a viewport.
+                    In other words only a subset of the framebuffer, the viewport,
+                    is actually visible on the display and application code can
+                    move this viewport."
+
+                cdl_option CYGNUM_DEVS_FRAMEBUF_SYNTH_FB[set _fb]_VIEWPORT_WIDTH {
+                    display		    "fb$_fb viewport width"
+                    flavor		    data
+                    default_value	CYGNUM_DEVS_FRAMEBUF_SYNTH_FB[set _fb]_WIDTH
+                    legal_values	16 to CYGNUM_DEVS_FRAMEBUF_SYNTH_FB[set _fb]_WIDTH
+                }
+
+                cdl_option CYGNUM_DEVS_FRAMEBUF_SYNTH_FB[set _fb]_VIEWPORT_HEIGHT {
+                    display		    "fb$_fb viewport height"
+                    flavor		    data
+                    default_value	CYGNUM_DEVS_FRAMEBUF_SYNTH_FB[set _fb]_HEIGHT
+                    legal_values	16 to CYGNUM_DEVS_FRAMEBUF_SYNTH_FB[set _fb]_HEIGHT
+                }
+            }
+
+            cdl_option CYGNUM_DEVS_FRAMEBUF_SYNTH_FB[set _fb]_PAGE_FLIPPING {
+                display		    "fb$_fb supports page flipping"
+                flavor		    booldata
+                default_value	0
+                legal_values	2 3 4
+                description "
+                    Optionally framebuffer device $_fb can support page flipping.
+                    The device supports between two and four pages, only one
+                    of which is visible on the display. This allows code to
+                    update one page without disturbing what is currently visible."
+            }
+        }
+
+        # Eliminate any framebuffer devices that are no longer enabled.
+        requires (CYGPKG_DEVS_FRAMEBUF_SYNTH_FB$_fb || !is_substr(CYGDAT_IO_FRAMEBUF_DEVICES, \" fb[set _fb] \"))
+    }
+
+    cdl_component CYGPKG_DEVS_FRAMEBUF_SYNTH_FUNCTIONALITY {
+        display		"Functionality supported by the enabled framebuffer(s)"
+        flavor		none
+        description "
+            The generic framebuffer code needs configure-time information about
+            functionality of the enabled framebuffer or framebuffers. Usually
+            all this information is fixed by the hardware, but the synthetic
+            target framebuffer support is more flexible than real hardware. To
+            cope with this some dummy options are needed."
+
+        active_if { CYGPKG_DEVS_FRAMEBUF_SYNTH_FB0 ||
+            CYGPKG_DEVS_FRAMEBUF_SYNTH_FB1 ||
+            CYGPKG_DEVS_FRAMEBUF_SYNTH_FB2 ||
+            CYGPKG_DEVS_FRAMEBUF_SYNTH_FB3 }
+        make -priority=1 {
+            $(PREFIX)/include/cyg/io/framebufs/synth_fb.h :	\
+                $(REPOSITORY)/$(PACKAGE)/src/gen_synthfb.tcl 	\
+                $(PREFIX)/include/pkgconf/devs_framebuf_synth.h
+            sh $< $(PREFIX)
+        }
+        compile synthfb.c
+        compile -library=libextras.a synthfb_init.cxx
+
+        cdl_option CYGHWR_DEVS_FRAMEBUF_SYNTH_FUNCTIONALITY_32BPP {
+            display	"One or more of the enabled framebuffer devices has a depth of 32bpp"
+            calculated  { is_substr(CYGDAT_DEVS_FRAMEBUF_SYNTH_FB0_FORMAT, "32BPP") ||
+                is_substr(CYGDAT_DEVS_FRAMEBUF_SYNTH_FB1_FORMAT, "32BPP") ||
+                is_substr(CYGDAT_DEVS_FRAMEBUF_SYNTH_FB2_FORMAT, "32BPP") ||
+                is_substr(CYGDAT_DEVS_FRAMEBUF_SYNTH_FB3_FORMAT, "32BPP") }
+            implements	CYGHWR_IO_FRAMEBUF_FUNCTIONALITY_32BPP
+        }
+        
+        cdl_option CYGHWR_DEVS_FRAMEBUF_SYNTH_FUNCTIONALITY_PALETTED {
+            display	"One or more of the enabled framebuffer devices uses a paletted display"
+            calculated  { is_substr(CYGDAT_DEVS_FRAMEBUF_SYNTH_FB0_FORMAT, "PAL") ||
+                is_substr(CYGDAT_DEVS_FRAMEBUF_SYNTH_FB1_FORMAT, "PAL") ||
+                is_substr(CYGDAT_DEVS_FRAMEBUF_SYNTH_FB2_FORMAT, "PAL") ||
+                is_substr(CYGDAT_DEVS_FRAMEBUF_SYNTH_FB3_FORMAT, "PAL") }
+            implements CYGHWR_IO_FRAMEBUF_FUNCTIONALITY_PALETTE
+            implements CYGHWR_IO_FRAMEBUF_FUNCTIONALITY_WRITEABLE_PALETTE
+        }
+
+        cdl_option CYGHWR_DEVS_FRAMEBUF_SYNTH_TRUE_COLOUR {
+            display	"One or more of the enabled framebuffer devices uses a true colour display"
+            calculated  { is_substr(CYGDAT_DEVS_FRAMEBUF_SYNTH_FB0_FORMAT, "TRUE") ||
+                is_substr(CYGDAT_DEVS_FRAMEBUF_SYNTH_FB1_FORMAT, "TRUE") ||
+                is_substr(CYGDAT_DEVS_FRAMEBUF_SYNTH_FB2_FORMAT, "TRUE") ||
+                is_substr(CYGDAT_DEVS_FRAMEBUF_SYNTH_FB3_FORMAT, "TRUE") }
+            implements CYGHWR_IO_FRAMEBUF_FUNCTIONALITY_TRUE_COLOUR
+        }
+    }
+
+    cdl_component CYGPKG_DEVS_FRAMEBUF_SYNTH_OPTIONS {
+        display "Framebuffer build options"
+        flavor  none
+        description   "
+	    Package specific build options including control over
+	    compiler flags used only in building the synthetic
+            target framebuffer device driver."
+
+        cdl_option CYGPKG_DEVS_FRAMEBUF_SYNTH_CFLAGS_ADD {
+            display "Additional compiler flags"
+            flavor  data
+            no_define
+            default_value { "" }
+            description   "
+                This option modifies the set of compiler flags for building
+                the synthetic target framebuffer device driver. These flags
+                are used in addition to the set of global flags."
+        }
+
+        cdl_option CYGPKG_DEVS_FRAMEBUF_SYNTH_CFLAGS_REMOVE {
+            display "Suppressed compiler flags"
+            flavor  data
+            no_define
+            default_value { "" }
+            description   "
+                This option modifies the set of compiler flags for building
+                the synthetic target framebuffer device driver. These flags
+                are removed from the set of global flags if present."
+        }
+    }
+}
new file mode 100644
--- /dev/null
+++ b/packages/devs/framebuf/synth/current/doc/synth_framebuf.sgml
@@ -0,0 +1,239 @@
+<!-- DOCTYPE refentry  PUBLIC "-//OASIS//DTD DocBook V3.1//EN" -->
+
+<!-- =============================================================== -->
+<!--                                                                 -->
+<!--     synth_framebuf.sgml                                         -->
+<!--                                                                 -->
+<!--     Synthetic target frame buffer device                        -->
+<!--                                                                 -->
+<!-- =============================================================== -->
+<!-- ####COPYRIGHTBEGIN####                                          -->
+<!--                                                                 -->
+<!-- =============================================================== -->
+<!-- Copyright (C) 2008 Free Software Foundation, Inc.               -->
+<!-- This material may be distributed only subject to the terms      -->
+<!-- and conditions set forth in the Open Publication License, v1.0  -->
+<!-- or later (the latest version is presently available at          -->
+<!-- http://www.opencontent.org/openpub/)                            -->
+<!-- Distribution of the work or derivative of the work in any       -->
+<!-- standard (paper) book form is prohibited unless prior           -->
+<!-- permission obtained from the copyright holder                   -->
+<!-- =============================================================== -->
+<!--                                                                 -->      
+<!-- ####COPYRIGHTEND####                                            -->
+<!-- =============================================================== -->
+<!-- #####DESCRIPTIONBEGIN####                                       -->
+<!--                                                                 -->
+<!-- Author(s):   bartv                                              -->
+<!-- Contact(s):  bartv                                              -->
+<!-- Date:        2008/10/07                                         -->
+<!-- Version:     0.01                                               -->
+<!--                                                                 -->
+<!-- ####DESCRIPTIONEND####                                          -->
+<!-- =============================================================== -->
+
+<part id="devs-framebuf-synth-ref">
+  <title>Synthetic Target Framebuffer Device</title>
+
+<refentry id="devs-framebuf-synth">
+  <refmeta>
+    <refentrytitle>Synthetic Target Framebuffer Device</refentrytitle>
+  </refmeta>
+  <refnamediv>
+    <refname>Synthetic Target Framebuffer Device</refname>
+    <refpurpose>Emulate framebuffer hardware in the synthetic target</refpurpose> 
+  </refnamediv>
+
+  <refsect1 id="devs-framebuf-synth-overview"><title>Overview</title>
+    <para>
+This package <varname>CYGPKG_DEVS_FRAMEBUF_SYNTH</varname> provides a
+framebuffer device driver for the eCos synthetic target.
+    </para>
+    <informalfigure PgWide=1>
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="synthfb.png" Scalefit=1 Align="Center">
+        </imageobject>
+      </mediaobject>
+    </informalfigure>
+    <para>
+The driver supports up to four framebuffer devices
+<varname>fb0</varname>, <varname>fb1</varname>, <varname>fb2</varname>
+and <varname>fb3</varname>. The width, height, depth, and display
+format of each framebuffer can be controlled via configuration
+options. It is also possible to set a viewport for each device and to
+enable page flipping.
+    </para>
+    <para>
+To use the framebuffer support the eCos application must run inside an
+X session, not from the console, and it must be started with
+<parameter>--io</parameter> to enable the I/O auxiliary. The I/O
+auxiliary will start a separate instance of a host-side utility
+<application>framebuf</application> for each target-side framebuffer
+device. The <application>framebuf</application> utility can access the
+eCos framebuffer data via a shared memory region and draw it to the
+screen using X library calls. It needs the X server to run with a
+TrueColor visual and a display of depth of 24 or 32 bits per pixel.
+    </para>
+  </refsect1>
+
+  <refsect1 id="devs-framebuf-synth-install"><title>Installation</title>
+    <para>
+The synthetic target framebuffer driver depends on host-side support
+which must be built and installed. The relevant code resides in the
+<filename class="directory">host</filename> subdirectory of the
+synthetic target framebuffer package, and building it involves the
+standard <command>configure</command>, <command>make</command> and
+<command>make install</command> steps. This will build and install a
+utility program <application>framebuf</application> that does the
+actual drawing of the eCos framebuffer contents to the host-side X
+display. It will also install a Tcl script and some support files.
+<application>framebuf</application> is an X11 application so can only
+be built on Linux systems with the appropriate X11 development package
+or packages.
+    </para>
+    <para>
+There are two main ways of building the host-side software. It is
+possible to build both the generic host-side software and all
+package-specific host-side software, including the framebuffer
+support, in a single build tree. This involves using the
+<command>configure</command> script at the toplevel of the eCos
+repository. For more information on this, see the
+<filename>README.host</filename> file at the top of the repository.
+Note that if you have an existing build tree which does not include
+the synthetic target framebuffer support then it will be necessary to
+rerun the toplevel configure script: the search for appropriate
+packages happens at configure time.
+    </para>
+    <para>
+The alternative is to build just the host-side for this package.
+This requires a separate build directory, building directly in the
+source tree is disallowed. The <command>configure</command> options
+are much the same as for a build from the toplevel, and the
+<filename>README.host</filename> file can be consulted for more
+details. It is essential that the framebuffer support be configured with
+the same <option>--prefix</option> option as other eCos host-side
+software, especially the I/O auxiliary provided by the architectural
+synthetic target HAL package, otherwise the I/O auxiliary will be
+unable to locate the framebuffer support.
+    </para>
+  </refsect1>
+  
+  <refsect1 id="devs-framebuf-synth-config"><title>Configuration</title>
+    <para>
+The package is loaded automatically when creating a configuration for
+the synthetic target. However it is inactive unless the generic
+framebuffer support <varname>CYGPKG_IO_FRAMEBUF</varname> is also
+added to the configuration, for example by <computeroutput>ecosconfig
+add framebuf</computeroutput>.
+    </para>
+    <para>
+By default the package enables a single framebuffer device
+<varname>fb0</varname> with a corresponding
+<structname>cyg_fb</structname> data structure
+<varname>cyg_synth_fb0</varname>. The default settings for this device
+are 320 by 240 pixels, a depth of 8 bits per pixel, a paletted
+display, no viewport support, and no page flipping. All of these
+settings can be changed by configuration options inside the CDL
+component <varname>CYGPKG_DEVS_FRAMEBUF_SYNTH_FB0</varname>. The
+supported display formats are: 8 bpp paletted; 8bpp true colour 332;
+16bpp true 565; 16bpp true 555; and 32bpp 0888. This allows the
+synthetic target to match the actual display capabilities of the
+hardware that is being emulated. If the actual hardware has more than
+one framebuffer device then this can be emulated by enabling
+additional components
+<varname>CYGPKG_DEVS_FRAMEBUF_SYNTH_FB1</varname> &hellip;, and
+setting the appropriate options.
+    </para>
+  </refsect1>
+
+  <refsect1 id="devs-framebuf-synth-customization"><title>Customization</title>
+    <para>
+In addition to the target-side configurability it is possible to
+customize the host-side behaviour. For example, the default behaviour
+is for <varname>fb0</varname> to be drawn inside the I/O auxiliary's
+main window, if it is not too large. <varname>fb1</varname>,
+<varname>fb2</varname> and <varname>fb3</varname> will be drawn inside
+separate toplevel windows, as will <varname>fb0</varname> if that has
+been configured too large for embedding in the main window. This
+behaviour can be changed by providing a custom Tcl/Tk procedure that
+creates the containing frame for the framebuffer device.
+    </para>
+    <para>
+Customization involves adding a <structname>synth_device</structname>
+<varname>framebuf</varname> section to the <filename>.tdf</filename>
+target definition file, usually <filename>default.tdf</filename> or
+<filename>~/.ecos/synth/default.tdf</filename>.
+    </para>
+    <programlisting width=72>
+proc my_framebuf_create_frame { &hellip } {
+    &hellip;
+}
+
+synth_device framebuf {
+    fb2_magnification   2
+    create_frame_proc   my_framebuf_create_frame
+}
+    </programlisting>
+    <para>
+The pixel size on the host display may be rather smaller than on the
+final hardware, causing a serious mismatch between the application's
+appearance when using synthetic target emulation and when using real
+hardware. To reduce this problem the host-side can magnify the
+target-side framebuffer devices. In the example above each target-side
+pixel in device <varname>fb2</varname> will be drawn using 2*2 pixels
+on the host side. Valid magnifications are 1, 2, 3 and 4. With a
+magnification of 4 an eCos framebuffer device of 320*240 pixels will
+be drawn in an X window of 1280*960 pixels.
+    </para>
+    <para>
+The <parameter>create_frame_proc</parameter> entry can be used to
+specify a custom Tcl/Tk procedure that will create the containing Tk
+frames for the host-side displays. This procedure can be written for a
+specific configuration, but it is supplied with all the parameters
+associated with the framebuffer device so can be more generic. An
+example is supplied in the package's <filename
+class="directory">misc</filename> subdirectory:
+    </para>
+    <orderedlist>
+      <listitem><para>
+Create a configuration for the synthetic target with the default
+template.
+      </para></listitem>
+      <listitem><para>
+Import the <filename>example.ecm</filename> configuration fragment
+from the <filename class="directory">misc</filename> subdirectory.
+This will add the generic framebuffer support package, enable all four
+framebuffer devices, and configure each device. Build the resulting
+configuration.
+      </para></listitem>
+      <listitem><para>
+Compile the <filename>example.c</filename> program and link it against
+the eCos configuration.
+      </para></listitem>
+      <listitem><para>
+Incorporate the <filename>example.tdf</filename> fragment into the
+appropriate target definition file, typically
+<filename>default.tdf</filename> or
+<filename>~/.ecos/synth/default.tdf</filename>.
+      </para></listitem>
+      <listitem><para>
+Run the example executable. The four framebuffer devices should get
+instantiated in a separate window in a single column.
+<varname>FB0</varname> just contains a static display.
+<varname>FB1</varname> supports two pages, one with vertical stripes
+and one with horizontal stripes, and the two pages are flipped at
+regular intervals. <varname>FB2</varname> has a static display similar
+to <varname>FB0</varname>, but is drawn in a viewport of only 160x120
+pixels. However <filename>example.tdf</filename> magnifies this by 2
+so it appears the same size as the other devices. The application
+moves the viewport around the underlying framebuffer device.
+<varname>FB3</varname> is also a static display, a simple set of
+vertical stripes. However this framebuffer is paletted and the palette
+is changed at regular intervals, causing apparent movement.
+      </para></listitem>
+    </orderedlist>
+  </refsect1>
+
+</refentry>
+</part>
\ No newline at end of file
new file mode 100644
index 0000000000000000000000000000000000000000..bd5d479696f85cde042b43e7462140cda28991c7
GIT binary patch
literal 9694
zc%1EeXH-*LxAq1Lc2orQP*sW$LsgI(Jv8ZpfDoF6666pBDN+*PSP<~g141ZDK%@i&
zB1lVAq=sTdKuU-L0i;EUl#oE~j=bZ3-xzm%_t!VZy+2+CW306^=X&O9^I3DQy<@Lh
z8Xw&E$36f64w_ssumJ#m9RT2awuc}5rDIRUD*%uJObjmD-p^j3#zr1np}t%CbXPWM
zXKK{mJ?*EA&pm%)@E1zq=*~*RLlpp2&wigm%oXd`_&A&5C*#pl#?TBSyy2n3J>!PO
zdjihBI${w0>^XICjwLk3N=g2q%*J-i&wF}CPBKwVJ{jGr;qQ84Xr9%nH<b@GD?gP@
zJ;jYjadiQ}d$B_<R|*aQx`&}al=>49;F74pe&G4R{9VAO-4uQR@c_XG5ROR0j}!bz
zs5yIf>_+hPWXH84bARXXJCB0h03h99ttrT$)Oc<2WQ~eO)B2DX1jf~Qhhf#lRaI53
zlfU9TT*9rbt@8)<W@byhdY;{cd3BfAJ$m%0h{*04J_krC4;3moHh$fpFCTZE8GcjR
zM!zPB_Y#3_EPmYE7ipPeI@QT>Hngy_<9N(ds&+mZs46tm4xYI|I!<cb+R&D>h?})K
z4)mx{jLGPggt^z25%rPWq^c@=JiMdCqi24oV^p7<;5!nwGM|aXLVPOx>GXsQ0Y9wr
zDK)if-;tVSGe>DwV|mF$8{G&QHgS-dVGMy_)qOX%62!;W470Q*yEYgf_A7Dvl_I@!
z6%`fHjGU1CO*S9k-Es!rY2(0l)nsn57a`)x&z)+K8r1u^vYTlmR+kCrSH<%3^2x7k
zuiJ@h-M@;Yxm_>Y6Cr3(HFk$qPCavPy0Zi^v9Z#P)kx&#+DBp1Pr!o9q(A92-F?qr
zM_=t$V36e`BePRe&$y-Bo3!s(>7>)m_m*UzWVsyyu1F#&0gy+!@WF$ktEiwi&H?K|
zgBE$}7ImBTI806s%5`qwPku!1k0%2IP^W_I0E?;Xl2{GD$tOqlQuXH)9;Vs%j5glX
zzkE4*MQiN!3;k=t_-;`R)99|pZet`;Acg2y%RU{i;K=I0!O){`%{Epy*LrfQIQ7Bp
zN$p%Ta0%`||JkYLFK;8VFXK+)0L=~6&zapAbYpz2#09W}jLp=cK3YpHFZ8D}6A(>r
z13da(S~TQlCWvcYfeO{f4A?#KOOU{*6~6ntdrmb~*3#ULU{GY4BMl1=VIW7}R!&&f
zQ8QF<#=WTZ?<2D24jUY12rVe%90gg&nyM4jJ;tI50#_gjE*lffX)GmRq+uAhvem%I
z5*=c_7jSfR>|7}NMt`rN;hTcKIEG99r2CY#&(XW174McHaX~>3UbV4T1kd*D{v)FM
zLN%Hj&ej%gVvw)xKi*ki;*}_|?Dcbb_zlh|VgBy>U5$nkfY_+3L?F+~o8Xl@O!J}c
z-EQ72R<3<Tt}eK<t%Epkv+KeK%O9>zC4>mt4-&&)zbq+n@%L}34+;pQjWt!hdYWi&
zQsD~8P!jz4taCT^y!UCryv^Eh+HuWO`&}LLJG>qDPtoZeS%dIte!yIU)@QTmvOrOQ
zLN_-`D-y&t146l5eJ?HTkgy933C{ex=(!ld-j0rBm(V;tlxrx9{&4Zd<}{%!#Hc-8
ziMW2N?uUM7r@M!cB>s5%xnynm>k8!O29g8OI|QbtrtI@{PDU1uE}DUx9oa+|VG^<<
zyPsc9=F)+vz=@^B%k;5+34Cax-f*GWan|fJ3a-1RW#V==08mm9sP!#&kZTtNezL@5
z0dMPS*jXV{Qo18*cZ;v&oR<dnZ;(0;9|D==;^2SFE=#uwlUx9}5?O?6;qepvfRZ3T
z@av~Et&bm=;h_*-B&4^=t;qfwYAPPKEcw!h$r{-^tq5GwpZWvu;1d2_SxG38wcZ!I
zHTE_0@vi${=4&;#RzE2NujEV&$-SmzqIlchInvE?!qFz|nCJ^D;PA_z_HgvpobfUQ
zTAFM^gwIS9cK|kLzaWNuUT`X`q6amWNHXvCKOU<P_^bfDf^Fal^G=p&0nzl}XlY5u
z*<FBq5lvJj<$KL%8{&-<H_n`*i312kW4<smqPKn`#k6=hp)Gv}M==p&pE6>#AOZk~
zK$f)B!(k?a(~ci{{c_3Gdq_>>Mj<_TKOaz>PctQ3sp+6AMh@<2w5X*SRsvG=qY3t$
zT{<<nB@1UYuqg`eUwTa;?{fHoFD6BZeq+(u+l7Xu!1LUhWBB!M*$q()Hb4|s`@X^E
z%YMLyymD<!cXcXuar9c1ID7Y*$S<QvOkN5fz(4Ux8UTEMFA4f-I!6)!ekkEiPXyMU
zcuYa6sw$l3W+)x5>TAh&I)I~IsXX91V%*HUT|Ohyj5zOEc_9DM<7pC}Cv0(OQGFuv
zM{f0>hP5YTyW3pPJwUwp?r$H5R52e;z&Y%u{Mn4Va*TTG+4=1CTPF?nA55&b3XH$`
z`A*vJh7yApDbU9zss51k%Y;uq?_*-YhLaQ4zhR2cn1QON#TdUET2U=Pi$Wb=9DfU!
zgr)PSov&U2SLNJ#WhJ-KNTp{7K%L?BbHCxFlTO#SD4%-D-3GWN4gy@ONWJ=d1ajZ^
zfToL!ObEYwDO7L?G-jj67w2&pdR~W*sSgh5kx<#Tuu+#MRE>`REi`!)19med)qERh
zX!aBI@m?Jh5wa8<ao;9M3^d9o%i1=2CyWR5!o*}-*Q4@<(}9V5Hg?;CSc|T^%|YEz
zY*yB5^-5BRh#(**!w*Zj8^quIAOY)@1-(Pz-}V1m_ZG#+?UW7}dK$NndvxUPpIC|1
z<R}AA^INy2rIN`BDhGJK{*7H#DvXS7YVED=kb+0;qnw5t#3T5IrFg{=D9A*-B7Yai
zL11A>;CTdCJP`ruiC0kg372`rX*iF$c&+z?ob_*ze}nudh+8j&SF_(2gW!v<6aJg0
zVCSY!h<ev^Y`pBoZ}nOKCnATxX8xHy#1#7d9KQYh8|1?u`MY)ozdXF!q{K5@s`p=j
zB6KT$_e@?4)NB<zF7&^4GX4$nKL&DT1fkNUsg2IH0D~&qCnC)cb^l%ef7UsAk+a!P
z<I;TNZuYF4Of5NRNEG1vGd=6`)pL(c?%MR>+t;Knwc8vPjcZYkmfb~-ixA|0cy4Hn
zC%%=kVE_AwHj#<BrDFa$)wcFD?EwHr?&6@feAc&rY2UbiR;0NgkUto*th?uMmDIuu
zhXdCHg$kUK8JDAyWU?he?G^RCA=~1Q`wS{iyv&uWL~eKG(nGNIL)E>3zs0H~@qC8^
zLgVZIGQFj@Hv_c&b)s||t>5Jgx22?=7YpTCorP`ppe#YEvh~)pD@6(0m{a}Iph<6K
z*KKjv1+!yd9OmiVAk323xhJ#UocH+Gmu;!}5jmc+X57Ep&I`4GA)JKQ_E@zc);wi&
z&+K-8xcFl&w@z40k+vJpw_UY9_n2}AJ-;n3ax$zuVbrWi-JVxfaA*ka+rN>>H%>gh
zx&3dWYfU1)=SBamsa87QjURL4`GKpFT}OSj!pD1)<2O&>+ex*%0mQR1OghdA%p#J4
zNAqRe;$W#@evp4m63P@~mi`dM?;ozE5ray(WY|Xgnb6QsO-)U1#2l2N)*G6m6=XWI
zr6o~lAQ=i=IpskptI+C!LEyKI5^G46cUyn`xH-1?FgT~*&aOM_0^7YeSF2ZNt&7Or
zqH#6`SMME-v*+LnA|_$n`D$+6tU{f8uY_(*@_AsT^$3)$N}d$P)5g&35IM_dmZ&wC
zXSLcd5Ma{(+Pm*1x<_YC`Xqkc*o4(CNLs8HZF`zb+MU>yGeUG}NaCsjh>PPm`rD{Y
zvmV6eVuJQ~?OE+NZPUFBYD0*%HKqN?naON{sV?v9&ZCW?%yO58a;Ive9>=Qt{$MV-
zYu7IQil)`9%Makw^rp?;$WB(C_{FRC_5)QO<ni%wFz;J>OAUaASY~~BX@TW%I7K3g
z=X(i^gkB%&22DGpGZxGSI|tmMXGtx?-xYcT8&=oDCp{PS1v_-RJ3D7bY8mf0*|o?a
z8wZDVRL~n%zlo5X=@k9p=#ZjI{p94NIabRq<>!yBO{6Gi#*I50@}n>yb+U3}vuUkU
z6FHK`)(h%P`^>jvvNRI?%UaWTF>Q2tbaZrn{x2pnm$T}`Oo@D^X1oQN#%2WKBGSes
zStS!~U~0Vloy{P7cVI><Ec_aeuxNh))6(ID@eIe84{<>)!q>&{WodokA&hjc9{X2c
z-uw_V?^@A78C>Sa#_C*!3_N3v5y|;lDFTJtHvamYxAikdTh1!o%r&e-Mu_ni_p-z^
z?2OC^lVXglbt?Dxd10^}wh;2yh^#1UoyJY5Gcda%Jbv76$*bNaoTF<KwwURq6+9!A
z8QcHT1I*>8EH>I`Tt&IbMKhqLku@cF;X;5)@$+o8d#wjd{x&8QBrmtO%M@x<SunfS
zeY3n0BsDB8=ZEXANw|l)ckPE<hc`byg!$aK+6h@TQ)q#iE+ukEdYsqRI3qbC%V?iM
z@nT<5;!5ux;0n~3kd{$NoPBCv?b%&$P<C!aqUu_>Ki#x;E;Z;Kn?Zz7>ixTZBr<sS
z6e-bka(ai72ThK9BLkHe+Cjk?g_iA@guB8U26Rv>O6aApjiHs3`E>t<v9<O9`n%|q
z(`}h4g-f^FI%8|q{nE7|a$~egeS6CkMNR0bUkL-<8r1W5Ca*a1hxw^_LNb&3F?P-#
z1Xn%gr;c0X3Af#yF^XHsw3;BFK3NN*PK1Lgw-vT!4To>EkJfc?3U>k;_Jq-NN7*1k
zD<*?%+3ntRLq_{TTkUuT)MdCK#LrQvJwsJZjTXxGjU9k$(8Nlq(VcOV6%hNUjo%*+
zx`kU*QC7Oz>D={qJCGVz)IEs#XQl5~d-gn)ISx(qNhBGYE;p2&aOg6`mW{dFX`zPC
zGvnL~JzSpqPqa!<Qk+d{hY8+i{Na^<Wsa!pE;g*K5#}>&ZH&lE?N|tOj_puJ0KQ0u
z6J|Nz4v>@the_6vcez_r-B>5>O%5l5RdO1B#%P}N?ZMxF^XJu$EHO4&kz4o5)J3rx
z$fx~8q%3#U>MUGhaFJ;t*@;PC|6vuWppv=|{c|k5a_4n;I)<D<W~8tSM?JfA4expO
zZmp~@ty;)PLfg*xp{>j$E@>KXEqqwxb%HK<93ppv;GTCjymF!~q2tG!((7csVJN(E
zII@6jSyNwPx-~?+xfzz|C*??U3=LtgmX)1jraTZ3M9)}7rU?1i<5M7}zrx|j!9_KA
z?>V@%*(+*8aLXOq&YNf}h&_Ap>EdyhFV)6^%#0L>qdL_2^(9N1hEIA3p}^ctLhqcM
zJ$J$H=!v<AHuc+!@+q(i&~?j#Ubo3$bcjVBk&`iQAvv7r&T&R%D05i&I5}3Cdvpil
zqL`9km{k%Y*85tK>;3PKb_g8GzTYNZWz2k%K7YDGT(!V%p`G4@^Jt3krChVh^g>dr
z48!i4(1_O-iQ4Z(RYuFH+>tp+&V*#VFGJ#dFYj_Ik25J(%^=b0pN;l_T+<Ha@HoZy
zZUnh=G1t3q-~Rp8)zuzH94nDIL1>OT)h4i@$|hfC`k1h=BSXSm6%P8;cPm)a>@>`8
zpv*CGk%~Vq$R|agr!2pHHcr31Zi`wjux*Qo#62jxUZ6YB0JEvG04~NH!H2D_b66mO
z_`$r$SU<G?Oj5SP&kWKp(tK6gUqZki{P}hykPU7SPv3#v`~Ejb!n;^3R>sPl7g0;Y
zXR7Nyk~U|9R6DuXMH?`9!n?$}OaOr4D-{TturE(HuG-ivZ}?QmlO{Jcqkr6;NNqHc
zSkuj6$VNRrbAwRhN6ku3ro6JoefaQU*~t&j8IK1BbGihQ$OmV@GXZ1)o^6z^f$2H7
znl8NgDnjPoM1`bY<MZddEw5W2;#Pgfu58sSpe;Rv{9vfSBo&?Ey3sS@hs`iwPLhn>
z-8w-Wtm|GEkj@>Up6^gvU`$Nkl>^3Qgz;G=C048RCpB+9oR8vn4pC*J>L#1kMw$8+
z7A<B<9THcA@1D|eD2^N07<9{65GyW=7+-4hz|zp0K|yx?IjM3C&`*>EC3DaF-x{g$
z?Y1&B1ud>rDwxW`ks)gKY_-9{!a|v*Fh|Pxwn-?{r>YmDTfuUi=){GCYex+uLo<FY
zjMUwm_R2$RrT?;4a~H_S%w#RDE=(yo5fI6r1PPrBLmuqdVQ#h-CN=epaOkgO<H__Z
z{0mCSO>aW)WhlD9-`ojWa|y|$m~JIWipZD$HN;s+*B21Xl1xqJoPwokn6SJG8X2AX
zuRi+qE$}UQQZ45EzNR%WB-8_6orE3=;lCumi*i&q{1<QKKRPEY-ZX;PH#DTVU{_d1
z9by+IhEM6gw8F}A1Kb+I-f+~M(eYe1hdfsixm7n^=C(NY#tivl#f-fcM64)BUUzQ1
z`<{O<);R|yhn+kHo8(K5ISqr+o;JC()CW!HMG~EZmSZ?q$D|V{NM9KZBd2Uf7hmRK
z(wC8)KPrfv<$NTSs2TPpP9#Q~?|E7l!eyX>CMkLU-NKAS%FdzpnO?4Hh)+U^Fl4Uf
z)T@)=ad@V|w(ekniqC|eF1RG5QmT)cn%;dzlZRP`X=_=<aL8!Yv(yEwBod-MpoODz
zlO)|DS1_ZGI!J66l9|$lT0bqg<51=8Hd496siIWaq%p^0S#K+Tlh}ZIT`@v6KMP-N
zkZ(;C_t|Qy%5V8@37jnqD5M7m3dW|dEK}P>k*|r~N7i4RT&@V0AILAtO~DLcvFda>
zJv1^Zw|VLxQ2}Q(YwDn=yQJ>g_ZUX@c@tGnR6lWI_2SbjDKQ-7j?+dTywR$tvegTf
zJQ8Y?W9g$m(xe#^r1d(+R$}yctG`B}RX~%cxHyEjVDC<0Xng_N^)UuM3$y)GKk{5c
z3t4~OIv0!coc~$_Ra5KJvWzKXrnT+#Kcn3Z#vqw$o{fZH{Jc!X+wpx6(aP$OQAQIp
zfn!F~L2<sSuuUNy`e+A`XS%IEU@)|A?;kAWUCst~&$wU8+LBvDIUzz~hoSryva?fr
zg6A|le=p9j1_9XC`s3jc!K}U35>);Cpzi0Ft8~Jq7iz)XdkT!R5U+8b5uxj^=P4pE
zcA0Z=pbP{u*B`f!X;xL88p$Brh0}cNa&ojo)I*-9$gpcaiqZP&pQFN=Pu^MSvI-{t
z+3_CPs3Tj2xET2JTXJV7+q1i~rzc(L^X{Q*iGOI?AY*l|eu&Va9%6lGA{G2n+Lqiv
z1RIGzTevD$$LpvT@ozpazhwY_RJli5nr#iC=b*I?u%bd8-rRlu7(4a;T&~_d<#>kx
z<L>+Z^iCwTzGGj7??_G6{+b>Q64Q3t%%qmf;2x5P#P^pAy2~MRhc@%$yFxy7%o<ys
zLv4j>UPD@e;i(PXpH8>Hp0CUoUT>BBT3bON*ovqG7&e8ksW+d&29>FIC5i-UPsa2%
z6gQf5!p_i9*Z;3x>cYhqcV22#);prVdP|-Yc-=2Da>Z`wxFo*pDJNMsW6|@Q{wv_p
zog5!ZmI`VEBq||Ra~N{8ds6TPKTsT0Zn$6mSmYjI;E8=0>V_f!Nc`t}h=0COW{2OD
zZZ?t0Zuf7F4B&@`hNeVuEfyMM7i$`wEq~37QPCX?%j^?@EBy(zdR`tLED}XtQ+Xe7
zN!!G5jy0XD7HMGnOfp9qJ^B{wS1)hR=KBtw0&XalN7-uBv4H5Vt}Za3Qir*{dATY^
zA$a$Jf$S-{606)_k+^FCH;w^O!6|X+W#wWSsirxD^>5DADb5WtG7aPB-BJ)Oq?oJu
z^otk!qET#j@|2vYW`zIDr+GGm<ojV~?G79mOIC9|GCK0{_ojO)8aY*=(Uv({7CEYg
zf$spv^iZ+f3GjqQhqD(N?k9=?1(nB)!PDP506eNd0#2}+SvrZ=l|;D{zan7Q>~B})
zcaq7XPOik;BkCY}T3T9Hw#vk><WqzAR4MV|%^|1Q^fK<PHzv%BI&EM=P-KxaT;n?e
z5jf;r7oiy=wlnH{nk_;4KvlV_Bdm>CAqY#$@5<8btK6GM3HbUN-E_X#k46k=s(Pi`
zYb$ZWu%r(>-~19JF7%%J(NES{eq=!A{JfNm#m=GbAM);>C2d-W+^piCxZT1hMU@uD
zgZU6Qkc&=zbDlMXxo)}M?YG>k&G_{G!K%g1_<=YNvimhKUV7tZUiUdHgdOa7#nEf4
z*Y0|zz@q7|pJHH|K=c|u?-<biOiy<iCILjb#JNd0gDKQ>PflrR$s%#CTm@%5LOOO1
zjI<bV6Y=nsdESnm(&OBvPv=2MML{=cdbODJyyknh;xI*xt<LBj@o{nPnTRHVqd=0L
z&FbQNMrkQ&Yqs>mhd-I(huadwl7&AzVKv%p84`rEv?n)V>g80B^^E@!3*G$r9VuXx
z%%q+#0)Snayl(+scW0~UTV5}7%D`Yeh{9vj-!&zksZE#UaXBp*2n#6!6yVb~vj>_5
z_3n>6+zVz8Z_vGs#*z!vhBYwxSb`OKxU^1-s>~Oh=RwP)?JP5l7dcuI<TLQhYePrJ
z_(F^ie-xoj?iTQ`XoUCb-}k?LIrslV?XfO=*-a39JgfqNV`u*We|z!_RcJR2>Rw8l
zhd^t|KbNHdDd<-mebx2ATq#dgrfrQdu5?4O8pM(cOF*<J)y%t{h67P&TS(!bw(NW|
z4MCff_{4NnCH-O^?-rndqX}i2t$K)n-7>H`3B6Y-94X7IcPt30h>^>x^Xb#mNhcrQ
zJn=Hu=p=Nd?V`$oW@U52#M<rbMwrcUAnNdX1av8opdOl#*3D6BRzA=yt!00?Q9t!>
zMCNs7!SwWHKHyuc!jq<(#fj;4-feb9=xIJ6%>UR&sLOktM=xesfe-j;;+V7^xGUB^
zqFkr^C=jI;dhFwpg;Jhq*DGcYZ&nVQ=j>A1am>Ato~{Va#hzB2)If@SF~hs1C>|Wg
z-_{}@b4$N8hJVW47F#E+I~U5rR|AiL^QCNmc{BjiiE#W8;4A|GdXBr6_E_Aan6B$<
z@~%>33nw(-)-+4rt;&*i5l)yDp9=tAessv?Ui2x%B!6r7W0Bq;-+kNl_M{*maOt?0
zA%t>E<|MS*DH*mC09-g4aK1Q91i@fi9ES)c!DrS>&cIhI>YF5H*6+L?L0x9Aj?^L#
z{uE_o>x9mx$tS}WfhZuGV$*2VT<EaGT3SzOyN<_x#)XHlgD@CO=;&fgubvZ&H64)u
z>ebm7Vc<YM4LVZd1Tj@!35PVZ(q@$K*wd6SPf9*Wx61vtcC5M`;7t8-$Pi5T?N|Gj
zD%M*Bx}e@;w7wJs)UolaKYMj?EGHwQ79=Z8)XcZ{9A?kRYcy)Ui~OM0;#pE==1`5V
z6RWVSX_8~L#*nnJA1JW{{qlomwHH=2nKoAH)jK-s?AY`VL`e<~JeOZFC96nKY-Brc
zi;Iw)tC4Z4@bThD`;}$~7A9+HuAA|0?OGi=eH*#ysKOO66gDx5JzoswV*3W)_zd#m
zBS_8a!mzGt$YP{r&hT3_iaFICD*_-C3J@$#u6=OuYAD_byGUZ_&6y1zI{6t)zZ{`<
zc{<*?xTn0&Gu;1K;a#ne+orljHE(?cgQ9)=_7ylxWrA)l19q@ji&!MgwYm8^LqPYm
z7xh?dy8Be$CfkB0rh5nFP0hLxu*1E>BL@VFhg?_p9VX0W{`mT$IjH$@$E~>(A_`Bt
z=sj)#?x(C0ZMe}BzmHdmI`=tWD-*=E6Cg@3E{B<DYoFx>rzj{Y*5t2Dy|nnO>|^bb
zf=PG&x<Q|@#({o_C|Rs+6jg+Mpbse1Ga`sOh{&}YE14mJ2~Z`{&5wIDRlsxb2x$Wo
z`cfF5;@V`d=!VQ?fs^%rK9Ar8td+Y2WP&+Ha7&Bu+(3sWxRAd6CBmSeTJ$e9w-}9@
zJxWjtP3u^Yxy;){<LjFEl$4{I_qt2$2Kdd=opZE;;2RvKiW9-rp{n5ZYh^jPwuq&l
z)jI^rCH0)qLscGRJ=8|y@-jK#rStN5yb`f7l6%U-180;V&0A=_*1aGv=_wxv1AwzQ
x4_EK)jSe${ERTSdoZs99Gcwx}1fqVeakb&qR&%r*3;_O_7+M;X|9Ru@{{UWqbo~GT
new file mode 100644
--- /dev/null
+++ b/packages/devs/framebuf/synth/current/host/Makefile.am
@@ -0,0 +1,84 @@
+## Process this file with automake to produce Makefile.in
+## =====================================================================
+##
+##     Makefile.am
+##
+##     Build support for the host-side synthetic target support,
+##     the ethernetpackage.
+##
+## =====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+# -------------------------------------------
+# This file is part of eCos, the Embedded Configurable Operating System.
+# Copyright (C) 2008 Free Software Foundation, Inc.
+#
+# eCos 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.
+#
+# eCos 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 eCos; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+#
+# As a special exception, if other files instantiate templates or use macros
+# or inline functions from this file, or you compile this file and link it
+# with other works to produce a work based on this file, this file does not
+# by itself cause the resulting work to be covered by the GNU General Public
+# License. However the source code for this file must still be made available
+# in accordance with section (3) of the GNU General Public License.
+#
+# This exception does not invalidate any other reasons why a work based on
+# this file might be covered by the GNU General Public License.
+# -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+## =====================================================================
+#######DESCRIPTIONBEGIN####
+##
+## Author(s):	bartv
+## Contact(s):	bartv
+## Date:	2005/10/28
+## Version:	0.01
+##
+######DESCRIPTIONEND####
+## =====================================================================
+
+AUTOMAKE_OPTIONS = 1.10 foreign
+
+## The synthetic target support consists of a single program framebuf,
+## a Tcl script, and some additional data files. These are
+## all installed in a single directory $(libexec)/ecos/<package>_<version>/
+## Neither the framebuf executable nor any of the scripts are directly
+## executable, instead framebuf gets fork()'d/execve()'d by the Tcl
+## script so $(libexec) is appropriate. Strictly speaking the
+## Tcl scripts and data files are architecture-independent so should
+## probably be installed in an analogous directory below $(datadir),
+## but that would add more directories for little real gain. The scripts
+## are treated as data files since they should not be executed directly,
+## i.e. they should not be installed with the execute bit set.
+
+AM_CFLAGS       = @ecos_CFLAGS@ -DECOSYNTH_VERSION=\"@VERSION@\" \
+ -DECOS_REPOSITORY=\"@ECOS_REPOSITORY@\" \
+ -DLIBEXECDIR=\"$(libexecdir)\" \
+ -DPKG_DIR=\"@PACKAGE_DIR@\" \
+ -DPKG_VERSION=\"@PACKAGE_VERSION@\" \
+ -DPKG_INSTALL=\"@PACKAGE_INSTALL@\"
+AM_CXXFLAGS     = @ecos_CXXFLAGS@
+INCLUDES        = @ecos_INCLUDES@
+LIBS            = @ecos_LIBS@ @ecos_LDADD@
+
+if SUPPORTED
+framebufdir 	= $(libexecdir)/ecos/@PACKAGE_INSTALL@
+framebuf_PROGRAMS	= framebuf
+framebuf_DATA		= framebuf.tcl framebuf.tdf framebuf_icon.xbm framebuf_iconmask.xbm
+framebuf_SOURCES	= framebuf.c
+framebuf_LDADD		= -L/usr/X11R6/lib -lX11
+
+## Manual dependencies
+framebuf.$(OBJEXT)	: Makefile ../src/protocol.h
+
+endif
new file mode 100644
--- /dev/null
+++ b/packages/devs/framebuf/synth/current/host/Makefile.in
@@ -0,0 +1,647 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  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@
+
+#####ECOSGPLCOPYRIGHTBEGIN####
+# -------------------------------------------
+# This file is part of eCos, the Embedded Configurable Operating System.
+# Copyright (C) 2008 Free Software Foundation, Inc.
+#
+# eCos 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.
+#
+# eCos 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 eCos; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+#
+# As a special exception, if other files instantiate templates or use macros
+# or inline functions from this file, or you compile this file and link it
+# with other works to produce a work based on this file, this file does not
+# by itself cause the resulting work to be covered by the GNU General Public
+# License. However the source code for this file must still be made available
+# in accordance with section (3) of the GNU General Public License.
+#
+# This exception does not invalidate any other reasons why a work based on
+# this file might be covered by the GNU General Public License.
+# -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+#######DESCRIPTIONBEGIN####
+######DESCRIPTIONEND####
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@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@
+@SUPPORTED_TRUE@framebuf_PROGRAMS = framebuf$(EXEEXT)
+subdir = .
+DIST_COMMON = $(am__configure_deps) \
+	$(srcdir)/../../../../../../acsupport/config.guess \
+	$(srcdir)/../../../../../../acsupport/config.sub \
+	$(srcdir)/../../../../../../acsupport/depcomp \
+	$(srcdir)/../../../../../../acsupport/install-sh \
+	$(srcdir)/../../../../../../acsupport/missing \
+	$(srcdir)/../../../../../../acsupport/mkinstalldirs \
+	$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(top_srcdir)/configure ../../../../../../acsupport/ChangeLog \
+	../../../../../../acsupport/config.guess \
+	../../../../../../acsupport/config.sub \
+	../../../../../../acsupport/depcomp \
+	../../../../../../acsupport/install-sh \
+	../../../../../../acsupport/ltconfig \
+	../../../../../../acsupport/ltmain.sh \
+	../../../../../../acsupport/missing \
+	../../../../../../acsupport/mkinstalldirs
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/../../../../../../acsupport/acinclude.m4 \
+	$(top_srcdir)/configure.in
+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 = $(SHELL) \
+	$(top_srcdir)/../../../../../../acsupport/mkinstalldirs
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(framebufdir)" \
+	"$(DESTDIR)$(framebufdir)"
+framebufPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(framebuf_PROGRAMS)
+am__framebuf_SOURCES_DIST = framebuf.c
+@SUPPORTED_TRUE@am_framebuf_OBJECTS = framebuf.$(OBJEXT)
+framebuf_OBJECTS = $(am_framebuf_OBJECTS)
+framebuf_DEPENDENCIES =
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/../../../../../../acsupport/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 = $(framebuf_SOURCES)
+DIST_SOURCES = $(am__framebuf_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|^.*/||'`;
+framebufDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(framebuf_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
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+ECOS_REPOSITORY = @ECOS_REPOSITORY@
+EXEEXT = @EXEEXT@
+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 = @ecos_LIBS@ @ecos_LDADD@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MSVC_SRCDIR = @MSVC_SRCDIR@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_DIR = @PACKAGE_DIR@
+PACKAGE_INSTALL = @PACKAGE_INSTALL@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+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@
+ac_ct_CXX = @ac_ct_CXX@
+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@
+ecos_CFLAGS = @ecos_CFLAGS@
+ecos_CXXFLAGS = @ecos_CXXFLAGS@
+ecos_INCLUDES = @ecos_INCLUDES@
+ecos_LDADD = @ecos_LDADD@
+ecos_LIBS = @ecos_LIBS@
+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_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = 1.10 foreign
+AM_CFLAGS = @ecos_CFLAGS@ -DECOSYNTH_VERSION=\"@VERSION@\" \
+ -DECOS_REPOSITORY=\"@ECOS_REPOSITORY@\" \
+ -DLIBEXECDIR=\"$(libexecdir)\" \
+ -DPKG_DIR=\"@PACKAGE_DIR@\" \
+ -DPKG_VERSION=\"@PACKAGE_VERSION@\" \
+ -DPKG_INSTALL=\"@PACKAGE_INSTALL@\"
+
+AM_CXXFLAGS = @ecos_CXXFLAGS@
+INCLUDES = @ecos_INCLUDES@
+@SUPPORTED_TRUE@framebufdir = $(libexecdir)/ecos/@PACKAGE_INSTALL@
+@SUPPORTED_TRUE@framebuf_DATA = framebuf.tcl framebuf.tdf framebuf_icon.xbm framebuf_iconmask.xbm
+@SUPPORTED_TRUE@framebuf_SOURCES = framebuf.c
+@SUPPORTED_TRUE@framebuf_LDADD = -L/usr/X11R6/lib -lX11
+all: all-am
+
+.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 '; \
+	      cd $(srcdir) && $(AUTOMAKE) --foreign  \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  Makefile'; \
+	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)
+	cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+install-framebufPROGRAMS: $(framebuf_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(framebufdir)" || $(MKDIR_P) "$(DESTDIR)$(framebufdir)"
+	@list='$(framebuf_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) $(framebufPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(framebufdir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(framebufPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(framebufdir)/$$f" || exit 1; \
+	  else :; fi; \
+	done
+
+uninstall-framebufPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(framebuf_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f '$(DESTDIR)$(framebufdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(framebufdir)/$$f"; \
+	done
+
+clean-framebufPROGRAMS:
+	-test -z "$(framebuf_PROGRAMS)" || rm -f $(framebuf_PROGRAMS)
+framebuf$(EXEEXT): $(framebuf_OBJECTS) $(framebuf_DEPENDENCIES) 
+	@rm -f framebuf$(EXEEXT)
+	$(LINK) $(framebuf_OBJECTS) $(framebuf_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/framebuf.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
+@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
+@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-framebufDATA: $(framebuf_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(framebufdir)" || $(MKDIR_P) "$(DESTDIR)$(framebufdir)"
+	@list='$(framebuf_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f=$(am__strip_dir) \
+	  echo " $(framebufDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(framebufdir)/$$f'"; \
+	  $(framebufDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(framebufdir)/$$f"; \
+	done
+
+uninstall-framebufDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(framebuf_DATA)'; for p in $$list; do \
+	  f=$(am__strip_dir) \
+	  echo " rm -f '$(DESTDIR)$(framebufdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(framebufdir)/$$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; nonemtpy = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	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; }; }'`; \
+	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)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	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; }; }'`; \
+	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)
+	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 $(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 $(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-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
+	$(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.lzma*) \
+	  unlzma -c $(distdir).tar.lzma | $(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 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$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)
+installdirs:
+	for dir in "$(DESTDIR)$(framebufdir)" "$(DESTDIR)$(framebufdir)"; 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:
+
+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-framebufPROGRAMS 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-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-framebufDATA install-framebufPROGRAMS
+
+install-dvi: install-dvi-am
+
+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
+
+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-framebufDATA uninstall-framebufPROGRAMS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
+	clean-framebufPROGRAMS clean-generic ctags dist dist-all \
+	dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ dist-zip \
+	distcheck distclean distclean-compile distclean-generic \
+	distclean-tags distcleancheck distdir distuninstallcheck dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-framebufDATA \
+	install-framebufPROGRAMS 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-framebufDATA uninstall-framebufPROGRAMS
+
+
+@SUPPORTED_TRUE@framebuf.$(OBJEXT)	: Makefile ../src/protocol.h
+# 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:
new file mode 100644
--- /dev/null
+++ b/packages/devs/framebuf/synth/current/host/acinclude.m4
@@ -0,0 +1,45 @@
+dnl Process this file with aclocal to get an aclocal.m4 file. Then
+dnl process that with autoconf.
+dnl ====================================================================
+dnl
+dnl     acinclude.m4
+dnl
+dnl ====================================================================
+dnl####COPYRIGHTBEGIN####
+dnl                                                                         
+dnl ----------------------------------------------------------------------------
+dnl Copyright (C) 2005 Bart Veer
+dnl
+dnl This file is part of the eCos host tools.
+dnl
+dnl This program is free software; you can redistribute it and/or modify it 
+dnl under the terms of the GNU General Public License as published by the Free 
+dnl Software Foundation; either version 2 of the License, or (at your option) 
+dnl any later version.
+dnl 
+dnl This program is distributed in the hope that it will be useful, but WITHOUT 
+dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
+dnl FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for 
+dnl more details.
+dnl 
+dnl You should have received a copy of the GNU General Public License along with
+dnl this program; if not, write to the Free Software Foundation, Inc., 
+dnl 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+dnl ----------------------------------------------------------------------------
+dnl                                                                          
+dnl####COPYRIGHTEND####
+dnl ====================================================================
+dnl#####DESCRIPTIONBEGIN####
+dnl
+dnl Author(s):	bartv
+dnl Contact(s):	bartv
+dnl Date:	2005/10/28
+dnl Version:	0.01
+dnl
+dnl####DESCRIPTIONEND####
+dnl ====================================================================
+
+dnl Access shared macros.
+dnl AM_CONDITIONAL needs to be mentioned here or else aclocal does not
+dnl incorporate the macro into aclocal.m4
+sinclude(../../../../../../acsupport/acinclude.m4)
new file mode 100644
--- /dev/null
+++ b/packages/devs/framebuf/synth/current/host/aclocal.m4
@@ -0,0 +1,898 @@
+# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 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.
+
+# 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(AC_AUTOCONF_VERSION, [2.61],,
+[m4_warning([this file was generated for autoconf 2.61.
+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  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.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 AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.10.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(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
+# 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 -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"])
+])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 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 13
+
+# 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_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  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 outputting 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
+
+m4_include([acinclude.m4])
new file mode 100644
--- /dev/null
+++ b/packages/devs/framebuf/synth/current/host/configure
@@ -0,0 +1,5355 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# 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.
+## --------------------- ##
+## 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=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="framebuf.c"
+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
+build
+build_cpu
+build_vendor
+build_os
+host
+host_cpu
+host_vendor
+host_os
+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
+CXX
+CXXFLAGS
+ac_ct_CXX
+CXXDEPMODE
+am__fastdepCXX_TRUE
+am__fastdepCXX_FALSE
+ecos_CFLAGS
+ecos_CXXFLAGS
+ecos_LDADD
+ecos_INCLUDES
+ecos_LIBS
+MSVC_SRCDIR
+MSVC_TRUE
+MSVC_FALSE
+ECOS_REPOSITORY
+PACKAGE_DIR
+PACKAGE_INSTALL
+SUPPORTED_TRUE
+SUPPORTED_FALSE
+LIBOBJS
+LTLIBOBJS'
+ac_subst_files=''
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CXX
+CXXFLAGS
+CCC'
+
+
+# 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}'
+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 this package 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/PACKAGE]
+  --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
+
+  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-debug           do a debug rather than a release build
+ --enable-ansi            do an ANSI rather than a unicode build
+
+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>
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_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
+configure
+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 $as_me, 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
+
+
+
+ac_aux_dir=
+for ac_dir in ../../../../../../acsupport "$srcdir"/../../../../../../acsupport; 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 ../../../../../../acsupport \"$srcdir\"/../../../../../../acsupport" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in ../../../../../../acsupport \"$srcdir\"/../../../../../../acsupport" >&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.
+
+
+
+
+
+  { echo "$as_me:$LINENO: checking that a separate build tree is being used" >&5
+echo $ECHO_N "checking that a separate build tree is being used... $ECHO_C" >&6; }
+  ecos_cwd=`/bin/pwd`
+  if test "${srcdir}" = "." ; then
+    srcdir=${ecos_cwd}
+  fi
+  if test "${ecos_cwd}" = "${srcdir}" ; then
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    { { echo "$as_me:$LINENO: error: This configure script should not be run inside the source tree. Instead please use a separate build tree" >&5
+echo "$as_me: error: This configure script should not be run inside the source tree. Instead please use a separate build tree" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+  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; }; }
+
+{ 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
+
+
+am__api_version='1.10'
+
+# 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=eCos_synthetic_target_framebuf
+ VERSION=0.1
+
+
+# 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_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
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  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_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # 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_CXX="$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
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+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_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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_CXX="$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_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CXX" && break
+done
+
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  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
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# 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); }
+
+{ 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_cxx_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_cxx_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_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-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_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	CXXFLAGS=""
+      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_cxx_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_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-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_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_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_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+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="$CXX"  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_CXX_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_CXX_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_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
+
+
+
+
+  ecos_CFLAGS=""
+  ecos_CXXFLAGS=""
+  ecos_LDADD=""
+  ecos_INCLUDES=""
+  ecos_LIBS=""
+
+
+
+
+
+
+
+
+
+
+
+  { echo "$as_me:$LINENO: checking \"for Visual C++\"" >&5
+echo $ECHO_N "checking \"for Visual C++\"... $ECHO_C" >&6; }
+  MSVC="no";
+  if test "${CC}" = "cl" ; then
+     MSVC="yes"
+     CXX="cl"
+     MSVC_SRCDIR=${srcdir}
+
+
+  if test "${MSVC}" = "yes" ; then
+    MSVC_SRCDIR=`cygpath -w ${MSVC_SRCDIR} | tr \\\\\\\\ /`
+  fi
+
+
+     ecos_INCLUDES="${ecos_INCLUDES} \"-I${MSVC_SRCDIR}\""
+     ecos_LDADD="-link"
+     ecos_LIBS="advapi32.lib"
+  fi
+   if test "${MSVC}" = "yes"; then
+  MSVC_TRUE=
+  MSVC_FALSE='#'
+else
+  MSVC_TRUE='#'
+  MSVC_FALSE=
+fi
+
+  if test "${MSVC}" = "yes" ; then
+    { echo "$as_me:$LINENO: result: unfortunately yes" >&5
+echo "${ECHO_T}unfortunately yes" >&6; }
+  else
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  fi
+
+
+
+
+
+
+
+  { echo "$as_me:$LINENO: checking \"the default compiler flags\"" >&5
+echo $ECHO_N "checking \"the default compiler flags\"... $ECHO_C" >&6; }
+
+      ecosflags_enable_debug="no"
+  # Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then
+  enableval=$enable_debug; case "${enableval}" in
+     yes) ecosflags_enable_debug="yes" ;;
+     *)   ecosflags_enable_debug="no" ;;
+  esac
+fi
+
+
+          ecosflags_enable_ansi="no"
+  if test "${MSVC}" = "yes" ; then
+    # Check whether --enable-ansi was given.
+if test "${enable_ansi+set}" = set; then
+  enableval=$enable_ansi; case "${enableval}" in
+       yes) ecosflags_enable_ansi="yes" ;;
+       *)   ecosflags_enable_ansi="no" ;;
+    esac
+fi
+
+  fi
+
+    if test "${GCC}" = "yes" ; then
+    ecos_CFLAGS="${ecos_CFLAGS} -pipe -Wall -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs"
+    ecos_CXXFLAGS="${ecos_CXXFLAGS} -pipe -Wall -Wpointer-arith -Wcast-qual -Woverloaded-virtual"
+  elif test "${MSVC}" = "yes" ; then
+    ecos_CFLAGS="${ecos_CFLAGS} -nologo -W3"
+    ecos_CXXFLAGS="${ecos_CXXFLAGS} -nologo -W3 -GR -GX"
+  else
+    { { echo "$as_me:$LINENO: error: \"default flags for ${CC} are not known\"" >&5
+echo "$as_me: error: \"default flags for ${CC} are not known\"" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+
+    if test "${ecosflags_enable_debug}" = "yes" ; then
+    if test "${GCC}" = "yes" ; then
+      ecos_CFLAGS="${ecos_CFLAGS} -g -O0"
+      ecos_CXXFLAGS="${ecos_CXXFLAGS} -g -O0"
+    elif test "${MSVC}" = "yes" ; then
+      ecos_CFLAGS="${ecos_CFLAGS} -MDd -Zi"
+      ecos_CXXFLAGS="${ecos_CXXFLAGS} -MDd -Zi"
+    fi
+  else
+            if test "${GCC}" = "yes" ; then
+      ecos_CFLAGS="${ecos_CFLAGS} -O2"
+      ecos_CXXFLAGS="${ecos_CXXFLAGS} -O2"
+    elif test "${MSVC}" = "yes" ; then
+      ecos_CFLAGS="${ecos_CFLAGS} -MD -O2"
+      ecos_CXXFLAGS="${ecos_CXXFLAGS} -MD -O2"
+    fi
+  fi
+
+  CFLAGS="${ac_save_CFLAGS}"
+  CXXFLAGS="${ac_save_CXXFLAGS}"
+
+  { echo "$as_me:$LINENO: result: done" >&5
+echo "${ECHO_T}done" >&6; }
+
+
+
+    package_dir=`cd ${srcdir} && /bin/pwd`
+  PACKAGE_VERSION=`dirname ${package_dir}`
+  PACKAGE_VERSION=`basename ${PACKAGE_VERSION}`
+
+          package_dir=`dirname ${package_dir}`
+  package_dir=`dirname ${package_dir}`
+
+  possibles="${package_dir}/.. ${package_dir}/../.. ${package_dir}/../../.. ${package_dir}/../../../.."
+  possibles="${possibles} ${package_dir}/../../../../.. ${package_dir}/../../../../../.."
+
+  repository_root=""
+  for i in ${possibles}; do
+    if test -d "$i/"acsupport""; then
+      repository_root=$i
+      break
+    fi
+  done
+
+  if test "${repository_root}" = "" ; then
+    { { echo "$as_me:$LINENO: error: Failed to identify this package's position within the eCos repository" >&5
+echo "$as_me: error: Failed to identify this package's position within the eCos repository" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+    ECOS_REPOSITORY=`cd "${repository_root}/packages/pkgconf/.." && /bin/pwd`
+
+    PACKAGE_DIR=`echo ${package_dir} | sed -e "s:${ECOS_REPOSITORY}/::"`
+
+            PACKAGE_INSTALL="${PACKAGE_DIR}/${PACKAGE_VERSION}"
+
+
+
+
+
+
+
+case "${host}" in
+    i[34567]86-*-linux-gnu* ) SUPPORTED="yes";;
+    * ) SUPPORTED="no"
+esac
+if test "${SUPPORTED}" = "no" ; then
+    { echo "$as_me:$LINENO: WARNING: Synthetic target framebuffer support is only available on x86 Linux hosts" >&5
+echo "$as_me: WARNING: Synthetic target framebuffer support is only available on x86 Linux hosts" >&2;}
+fi
+
+ if test "${SUPPORTED}" = "yes"; then
+  SUPPORTED_TRUE=
+  SUPPORTED_FALSE='#'
+else
+  SUPPORTED_TRUE='#'
+  SUPPORTED_FALSE=
+fi
+
+
+
+ac_config_files="$ac_config_files Makefile:Makefile.in"
+
+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}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section.  Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+t clear
+:clear
+s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+	g
+	s/^\n//
+	s/\n/ /g
+	p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.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 "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${MSVC_TRUE}" && test -z "${MSVC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"MSVC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"MSVC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${SUPPORTED_TRUE}" && test -z "${SUPPORTED_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"SUPPORTED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"SUPPORTED\" 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 $as_me, 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_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
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+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;;
+  --he | --h |  --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
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:Makefile.in" ;;
+
+  *) { { 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_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
+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
+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
+CXX!$CXX$ac_delim
+CXXFLAGS!$CXXFLAGS$ac_delim
+ac_ct_CXX!$ac_ct_CXX$ac_delim
+CXXDEPMODE!$CXXDEPMODE$ac_delim
+am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim
+am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim
+ecos_CFLAGS!$ecos_CFLAGS$ac_delim
+ecos_CXXFLAGS!$ecos_CXXFLAGS$ac_delim
+ecos_LDADD!$ecos_LDADD$ac_delim
+ecos_INCLUDES!$ecos_INCLUDES$ac_delim
+ecos_LIBS!$ecos_LIBS$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
+MSVC_SRCDIR!$MSVC_SRCDIR$ac_delim
+MSVC_TRUE!$MSVC_TRUE$ac_delim
+MSVC_FALSE!$MSVC_FALSE$ac_delim
+ECOS_REPOSITORY!$ECOS_REPOSITORY$ac_delim
+PACKAGE_DIR!$PACKAGE_DIR$ac_delim
+PACKAGE_INSTALL!$PACKAGE_INSTALL$ac_delim
+SUPPORTED_TRUE!$SUPPORTED_TRUE$ac_delim
+SUPPORTED_FALSE!$SUPPORTED_FALSE$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` = 10; 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      :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
+ ;;
+
+
+  :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 -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=`$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
+
new file mode 100644
--- /dev/null
+++ b/packages/devs/framebuf/synth/current/host/configure.in
@@ -0,0 +1,91 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl ====================================================================
+dnl
+dnl     configure.in
+dnl
+dnl     configure script for eCos synthetic target framebuffer
+dnl	host-side support
+dnl
+dnl ====================================================================
+dnl####ECOSGPLCOPYRIGHTBEGIN####
+dnl -------------------------------------------
+dnl This file is part of eCos, the Embedded Configurable Operating System.
+dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl
+dnl eCos is free software; you can redistribute it and/or modify it under
+dnl the terms of the GNU General Public License as published by the Free
+dnl Software Foundation; either version 2 or (at your option) any later version.
+dnl
+dnl eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+dnl WARRANTY; without even the implied warranty of MERCHANTABILITY or
+dnl FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+dnl for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License along
+dnl with eCos; if not, write to the Free Software Foundation, Inc.,
+dnl 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+dnl
+dnl As a special exception, if other files instantiate templates or use macros
+dnl or inline functions from this file, or you compile this file and link it
+dnl with other works to produce a work based on this file, this file does not
+dnl by itself cause the resulting work to be covered by the GNU General Public
+dnl License. However the source code for this file must still be made available
+dnl in accordance with section (3) of the GNU General Public License.
+dnl
+dnl This exception does not invalidate any other reasons why a work based on
+dnl this file might be covered by the GNU General Public License.
+dnl -------------------------------------------
+dnl####ECOSGPLCOPYRIGHTEND####
+dnl ====================================================================
+dnl#####DESCRIPTIONBEGIN####
+dnl
+dnl Author(s):	bartv
+dnl Contact(s):	bartv
+dnl Date:	2005/10/28
+dnl Version:	0.01
+dnl
+dnl####DESCRIPTIONEND####
+dnl ====================================================================
+
+
+AC_INIT(framebuf.c)
+
+dnl Pick up the support files from the top-level acsupport directory.
+AC_CONFIG_AUX_DIR(../../../../../../acsupport)
+
+dnl The current version of the synthetic target is implemented only for
+dnl x86 Linux platforms, so a test is appropriate here. However
+dnl it is not a good idea for the configure script to report an error:
+dnl that would prevent any top-level configury working for other
+dnl platforms. Instead an automake conditional is used to suppress adding
+dnl targets to the build. Unfortunately it is still necessary to
+dnl perform most of the tests or you run into problems with e.g.
+dnl automake's dependency handling.
+
+ECOS_CHECK_BUILD_ne_SRC
+AC_CANONICAL_HOST
+AM_INIT_AUTOMAKE(eCos_synthetic_target_framebuf,0.1,0)
+AM_MAINTAINER_MODE
+AC_PROG_CC
+AC_PROG_CXX
+AC_OBJEXT
+AC_EXEEXT
+ECOS_PROG_MSVC
+ECOS_PROG_STANDARD_COMPILER_FLAGS
+ECOS_PACKAGE_DIRS
+
+case "${host}" in
+    i[[34567]]86-*-linux-gnu* ) SUPPORTED="yes";;
+    * ) SUPPORTED="no"
+esac
+if test "${SUPPORTED}" = "no" ; then
+    AC_MSG_WARN([Synthetic target framebuffer support is only available on x86 Linux hosts])
+fi   
+
+AM_CONDITIONAL(SUPPORTED, test "${SUPPORTED}" = "yes")
+
+dnl There is no real need for a config.h file at this time, since the code
+dnl is specific to x86 Linux. This may change in future.
+dnl AM_CONFIG_HEADER(config.h:config.h.in)
+
+AC_OUTPUT(Makefile:Makefile.in)
new file mode 100644
--- /dev/null
+++ b/packages/devs/framebuf/synth/current/host/framebuf.c
@@ -0,0 +1,1484 @@
+//============================================================================
+//
+//     framebuf.c
+//
+//     A utility program to perform low-level ethernet operations
+//
+//============================================================================
+//###ECOSGPLCOPYRIGHTBEGIN####
+//-------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2008 Free Software Foundation, Inc.
+// eCos 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.
+//
+// eCos 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 eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+//  Author(s):   bartv
+//  Contact(s):  bartv
+//  Date:        2005/10/28
+//  Version:     0.01
+//  Description:
+//      Implementation of a framebuffer device. This script should only ever
+//      be run from inside the ecosynth auxiliary.
+//
+// This program is fork'ed by the framebuf.tcl script running inside
+// the synthetic target auxiliary. It is responsible for performing the
+// low-level framebuffer accesses.
+//
+//####DESCRIPTIONEND####
+//============================================================================
+
+// We want to instantiate multiple conversion routines for the different
+// graphics formats, with extensive use of macros for efficiences. Multiple
+// C #include's are used for this.
+#ifndef RENDERFN
+# include <stdio.h>
+# include <stdarg.h>
+# include <stdlib.h>
+# include <string.h>
+# include <time.h>
+# include <signal.h>
+# include <limits.h>
+# include <unistd.h>
+# include <fcntl.h>
+# include <errno.h>
+# include <sys/param.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <sys/socket.h>
+# include <sys/ioctl.h>
+# include <sys/mman.h>
+# include <X11/Xlib.h>
+
+// The protocol between host and target is defined by a private
+// target-side header.
+# include "../src/protocol.h"
+
+// ----------------------------------------------------------------------------
+// Globals
+// First the variables needed for X operations. The window is created by
+// Tcl/Tk code and its id is supplied as an argument.
+static Display*         host_display;
+static Window           host_win    = 0;
+static GC               host_gc;
+static XImage*          host_image;
+
+// R, G & B shifts for the host-side. Used for palette conversion.
+static int              host_r_shift;
+static int              host_g_shift;
+static int              host_b_shift;
+
+// The image data. Only 32bpp is supported.
+// NOTE: this is not 64-bit clean.
+static unsigned int*    img_fb;
+
+// This is used for display depths up to and including 16bpp -
+// 256K of static data is irrelevant for a Linux host-side app.
+// 32bpp will have to be handled differently.
+static unsigned int     host_palette[65536];
+
+// The current function for rendering target-side data
+static void             (*render_fn)(int, int, int, int);
+
+// And palette init and update functions.
+static void             (*palette_init_fn)(void);
+static void             (*palette_update_fn)(void);
+
+// Positions. With target-side viewports, magnification, and the
+// possibility of windows being resized, this can
+// get very messy.
+//
+// The target-side framebuffer consists of n pages, each of
+// width*height pixels, plus possibly padding at the end of each
+// scanline.
+//
+// img_fb consists of viewport_width*viewport_height pixels.
+// At magnification 1 each pixel is a 32-bit unsigned int, but
+// at higher magnification each pixel takes up mag^2 unsigned
+// ints.
+//
+// win_width and win_height determine the current window dimensions in
+// target pixel units, i.e. ignoring magnification. x_win_width
+// and x_win_height are the same dimensions in X pixels, so
+// mag*win_width. These dimensions are provided by X configure events.
+// They may be smaller, the same size, or larger than the viewport.
+//
+// A coordinate (target_x,target_y) within the current page
+// corresponds to (target_x - viewport_x, target_y - viewport_y).
+// within host_image and within the window.
+//
+// For an X expose event we get X windows coordinates.
+
+// The actually visible window dimensions. If the Tk window gets
+// resized then only part of the image data may be visible. These
+// variables change in response to X configure events.
+static int              win_width;
+static int              win_height;
+static int              x_win_width;
+static int              x_win_height;
+
+// Target-side framebuffer.
+//
+// The synth_fb_data structure at the start of the shared memory region.
+static synth_fb_data*   shared_fb_data;
+
+// The target-side framebuffer starts at shared_fb_data->framebuf[0].
+// However that is not necessarily where the visible data starts
+// because of page flipping and viewport support. This always points
+// at the top-left corner of visible data.
+static void*            target_fb;
+
+// Parameters supplied by the target.
+static int              target_id;
+static int              target_depth;
+static int              target_le;
+static int              target_width;
+static int              target_height;
+static int              target_viewport_width;
+static int              target_viewport_height;
+static int              target_stride;
+static int              target_number_pages;
+static char*            target_format;
+
+// Parameters supplied by a host-side configuration file
+static int              config_magnification;
+
+// Communication between host and target happens partially through the
+// shared memory region and partially through a fifo, the latter
+// allowing for select(). shared_fb_data already points at the shared
+// memory region.
+static char             shm_name[L_tmpnam];
+static int              shm_created;
+static int              shm_fd;
+static char             fifo_t2h_name[L_tmpnam];
+static int              fifo_t2h_created;
+static int              fifo_t2h_fd;
+static char             fifo_h2t_name[L_tmpnam];
+static int              fifo_h2t_created;
+static int              fifo_h2t_fd;
+
+// An atexit() handler for cleaning up the fifos and shared memory.
+static void
+atexit_handler(void)
+{
+    if (shm_created) {
+        unlink(shm_name);
+    }
+    if (fifo_t2h_created) {
+        unlink(fifo_t2h_name);
+    }
+    if (fifo_h2t_created) {
+        unlink(fifo_h2t_name);
+    }
+}
+
+// ----------------------------------------------------------------------------
+// Diagnostics. Warnings and errors are sent up to the I/O auxiliary for
+// display there. Debug output goes straight to stderr
+
+// Set the DEBUG_LEVEL to 0 for no debugging, 3 for maximum debugging.
+#define DEBUG_LEVEL 0
+#define DEBUG(_level_, _str_, ...)                                  \
+    if (_level_ <= DEBUG_LEVEL) {                                   \
+        fprintf(stderr, "%d: " _str_, target_id, ## __VA_ARGS__);   \
+    }
+
+#if 0
+static void
+warn(char* fmt, ...)
+{
+    char        buf[512];
+    va_list     args;
+    va_start(args, fmt);
+
+    sprintf(buf, "Warning (fb%d) : ", target_id);
+    vsnprintf(buf + strlen(buf), 512 - strlen(buf), fmt, args);
+    buf[511] = '\0';
+
+    (void) write(1, buf, strlen(buf));
+}
+#endif
+
+static void
+error(char* fmt, ...)
+{
+    char        buf[512];
+    va_list     args;
+    va_start(args, fmt);
+
+    sprintf(buf, "Error (fb%d) : ", target_id);
+    vsnprintf(buf + strlen(buf), 512 - strlen(buf), fmt, args);
+    buf[511] = '\0';
+
+    (void) write(1, buf, strlen(buf));
+    exit(1);
+}
+
+// ----------------------------------------------------------------------------
+// Host-side.
+//
+// The main redraw routines. schedule_redraw() can get called as a result of:
+//
+// 1) an X expose event.
+// 2) a message from the Tk code affecting the on/off setting of
+//    the framebuffer.
+// 3) a message from the target-side code indicating some of the
+//    target-side data has changed, or some other event such as
+//    viewport repositioning or page flipping.
+//
+// It just maintains a bounding box. do_redraw() does the real work and
+// is called from inside the main loop.
+
+static int  redraw_pending = 0;
+static int  x_redraw_x, x_redraw_y, x_redraw_width, x_redraw_height;
+
+static void
+do_redraw(void)
+{
+    while (redraw_pending) {
+        redraw_pending = 0;
+        DEBUG(3, "do_redraw: win_x %d, win_y %d, width %d, height %d\n", x_redraw_x, x_redraw_y, x_redraw_width, x_redraw_height);
+        XPutImage(host_display, host_win, host_gc, host_image, x_redraw_x, x_redraw_y, x_redraw_x, x_redraw_y, x_redraw_width, x_redraw_height);
+        XFlush(host_display);
+    }
+}
+
+static void
+schedule_redraw(int x_new_x, int x_new_y, int x_new_width, int x_new_height)
+{
+    if (! redraw_pending) {
+        redraw_pending  = 1;
+        x_redraw_x        = x_new_x;
+        x_redraw_y        = x_new_y;
+        x_redraw_width    = x_new_width;
+        x_redraw_height   = x_new_height;
+    } else {
+        if (x_redraw_x > x_new_x) {
+            x_redraw_x = x_new_x;
+        } else {
+            x_new_width += (x_new_x - x_redraw_x);
+        }
+        if (x_redraw_y > x_new_y) {
+            x_redraw_y = x_new_y;
+        } else {
+            x_new_height += (x_new_y - x_redraw_y);
+        }
+        if (x_new_width > x_redraw_width) {
+            x_redraw_width = x_new_width;
+        }
+        if (x_new_height > x_redraw_height) {
+            x_redraw_height = x_new_height;
+        }
+    }
+}
+
+// ----------------------------------------------------------------------------
+// Utility for blanking the screen
+static void
+blackout(void)
+{
+    memset(img_fb, 0, target_viewport_width * target_viewport_height * sizeof(int) * config_magnification * config_magnification);
+    if (0 != host_win) {
+        schedule_redraw(0, 0, x_win_width, x_win_height);
+    }
+}
+
+// ----------------------------------------------------------------------------
+// This function gets called when the main select() indicates the
+// X server is trying to send some data.
+static void
+handle_X_event(void)
+{
+    XEvent      event;
+
+    XNextEvent(host_display, &event);
+    switch(event.type) {
+      case Expose:
+        {
+            // In theory this code should be able to do partial redraws for every
+            // expose event, but that does not seem to work reliably. Instead do a
+            // full redraw, but only for the final event in a sequence.
+            if (0 == event.xexpose.count) {
+                DEBUG(3, "X expose event, x %d, y %d, width %d, height %d\n",
+                      event.xexpose.x, event.xexpose.y, event.xexpose.width, event.xexpose.height);
+                schedule_redraw(0, 0, x_win_width, x_win_height);
+            }
+            break;
+        }
+
+      case ConfigureNotify:
+        {
+            DEBUG(2, "X configure notify event, width %d, height %d\n", event.xconfigure.width, event.xconfigure.height);
+            x_win_width     = event.xconfigure.width;
+            x_win_height    = event.xconfigure.height;
+            win_width       = (x_win_width  + config_magnification - 1) / config_magnification;
+            win_height      = (x_win_height + config_magnification - 1) / config_magnification;
+
+            if (shared_fb_data->display_on && shared_fb_data->blank_on) {
+                (*render_fn)(0 + shared_fb_data->viewport_x, 0 + shared_fb_data->viewport_y, win_width, win_height);
+            } else {
+                blackout();
+            }
+            break;
+        }
+    }
+}
+
+// ----------------------------------------------------------------------------
+// Conversion routines
+
+// This dummy function is installed to handle draw requests before the
+// window is mapped - until that time the exact render function is unknown.
+static void
+dummy_render_fn(int target_x, int target_y, int width, int height)
+{
+    DEBUG(2, "rendering: target_x %d, target_y %d, width %d, height %d\n", target_x, target_y, width, height);
+    DEBUG(2, "         : window has not been mapped on to the display yet\n");
+}
+#else  // RENDERFN
+
+// These functions get instantiated N times for the N different
+// graphics formats. We need to take the target-side region defined by
+// x/y/width/height, render it into the image data, and then redraw
+// the relevant part of the image data. There is no point rendering more
+// data than is visible.
+
+static void
+RENDERFN(1, TARGET_FORMAT)(int target_x, int target_y, int width, int height)
+{
+    int             x, y;
+    int             win_x, win_y;
+    unsigned int*   img_data;
+    unsigned int    colour;
+    TARGET_DATA;
+
+    DEBUG(2, "rendering: target_x %d, target_y %d, width %d, height %d\n", target_x, target_y, width, height);
+    if ((0 == host_win) || !shared_fb_data->display_on || !shared_fb_data->blank_on) {
+        DEBUG(2, "         : no-op, host_win %d, display_on %d, blank_on %d\n", (int)host_win, shared_fb_data->display_on, shared_fb_data->blank_on);
+        return;
+    }
+    DEBUG(2, "         : current viewport x %d, y %d\n", shared_fb_data->viewport_x, shared_fb_data->viewport_y);
+
+    win_x   = target_x - shared_fb_data->viewport_x;
+    win_y   = target_y - shared_fb_data->viewport_y;
+    if (win_x < 0) {
+        width       += win_x;
+        win_x        = 0;
+    }
+    if (win_y < 0) {
+        height      += win_y;
+        win_y        = 0;
+    }
+    if ((win_x + width) > win_width) {
+        width = win_width - win_x;
+    }
+    if ((win_y + height) > win_height) {
+        height = win_height - win_y;
+    }
+    DEBUG(2, "         : after clipping, win_x %d, win_y %d, width %d, height %d\n", win_x, win_y, width, height);
+    if ((width < 0) || (height < 0)) {
+        return;
+    }
+
+    img_data    = img_fb    + (win_y * target_viewport_width) + win_x;
+    for (y = 0; y < height; y++) {
+        for (x = 0; x < width; x++) {
+            colour  = TARGET_NEXT_COLOUR();
+            *img_data++  = colour;
+        }
+        img_data += (target_viewport_width - width);
+        TARGET_NEXT_LINE();
+    }
+    schedule_redraw(win_x, win_y, width, height);
+}
+
+static void
+RENDERFN(2, TARGET_FORMAT)(int target_x, int target_y, int width, int height)
+{
+    int             x, y;
+    int             win_x, win_y;
+    unsigned int*   img_data0;
+    unsigned int*   img_data1;
+    unsigned int    colour;
+    TARGET_DATA;
+
+    DEBUG(2, "rendering: target_x %d, target_y %d, width %d, height %d\n", target_x, target_y, width, height);
+    if ((0 == host_win) || !shared_fb_data->display_on || !shared_fb_data->blank_on) {
+        DEBUG(2, "         : no-op, host_win %d, display_on %d, blank_on %d\n", (int)host_win, shared_fb_data->display_on, shared_fb_data->blank_on);
+        return;
+    }
+    DEBUG(2, "         : current viewport x %d, y %d\n", shared_fb_data->viewport_x, shared_fb_data->viewport_y);
+    win_x   = target_x - shared_fb_data->viewport_x;
+    win_y   = target_y - shared_fb_data->viewport_y;
+    if (win_x < 0) {
+        width       += win_x;
+        win_x        = 0;
+    }
+    if (win_y < 0) {
+        height      += win_y;
+        win_y        = 0;
+    }
+    if ((win_x + width) > win_width) {
+        width = win_width - win_x;
+    }
+    if ((win_y + height) > win_height) {
+        height = win_height - win_y;
+    }
+    DEBUG(2, "         : after clipping, target_x %d, target_y %d, width %d, height %d\n", target_x, target_y, width, height);
+    if ((width < 0) || (height < 0)) {
+        return;
+    }
+    
+
+    for (y = 0; y < height; y++) {
+        img_data0       = img_fb + (2 * (win_y + y) * (2 * target_viewport_width)) + (2 * win_x);
+        img_data1       = img_data0 + (2 * target_viewport_width);
+        for (x = 0; x < width; x++) {
+            colour  = TARGET_NEXT_COLOUR();
+            *img_data0++  = colour;
+            *img_data0++  = colour;
+            *img_data1++  = colour;
+            *img_data1++  = colour;
+        }
+        TARGET_NEXT_LINE();
+    }
+    schedule_redraw(2 * win_x, 2 * win_y, 2 * width, 2 * height);
+}
+
+static void
+RENDERFN(3, TARGET_FORMAT)(int target_x, int target_y, int width, int height)
+{
+    int             x, y;
+    int             win_x, win_y;
+    unsigned int*   img_data0;
+    unsigned int*   img_data1;
+    unsigned int*   img_data2;
+    unsigned int    colour;
+    TARGET_DATA;
+
+    DEBUG(2, "rendering: target_x %d, target_y %d, width %d, height %d\n", target_x, target_y, width, height);
+    if ((0 == host_win) || !shared_fb_data->display_on || !shared_fb_data->blank_on) {
+        DEBUG(2, "         : no-op, host_win %d, display_on %d, blank_on %d\n", (int)host_win, shared_fb_data->display_on, shared_fb_data->blank_on);
+        return;
+    }
+    DEBUG(2, "         : current viewport x %d, y %d\n", shared_fb_data->viewport_x, shared_fb_data->viewport_y);
+    win_x   = target_x - shared_fb_data->viewport_x;
+    win_y   = target_y - shared_fb_data->viewport_y;
+    if (win_x < 0) {
+        width       += win_x;
+        win_x        = 0;
+    }
+    if (win_y < 0) {
+        height      += win_y;
+        win_y        = 0;
+    }
+    if ((win_x + width) > win_width) {
+        width = win_width - win_x;
+    }
+    if ((win_y + height) > win_height) {
+        height = win_height - win_y;
+    }
+    DEBUG(2, "         : after clipping, target_x %d, target_y %d, width %d, height %d\n", target_x, target_y, width, height);
+    if ((width < 0) || (height < 0)) {
+        return;
+    }
+
+    for (y = 0; y < height; y++) {
+        img_data0       = img_fb + (3 * (win_y + y) * (3 * target_viewport_width)) + (3 * win_x);
+        img_data1       = img_data0 + (3 * target_viewport_width);
+        img_data2       = img_data1 + (3 * target_viewport_width);
+
+        for (x = 0; x < width; x++) {
+            colour  = TARGET_NEXT_COLOUR();
+            *img_data0++  = colour;
+            *img_data0++  = colour;
+            *img_data0++  = colour;
+            *img_data1++  = colour;
+            *img_data1++  = colour;
+            *img_data1++  = colour;
+            *img_data2++  = colour;
+            *img_data2++  = colour;
+            *img_data2++  = colour;
+        }
+        TARGET_NEXT_LINE();
+    }
+    schedule_redraw(3 * win_x, 3 * win_y, 3 * width, 3 * height);
+}
+
+static void
+RENDERFN(4, TARGET_FORMAT)(int target_x, int target_y, int width, int height)
+{
+    int             x, y;
+    int             win_x, win_y;
+    unsigned int*   img_data0;
+    unsigned int*   img_data1;
+    unsigned int*   img_data2;
+    unsigned int*   img_data3;
+    unsigned int    colour;
+    TARGET_DATA;
+
+    DEBUG(2, "rendering: target_x %d, target_y %d, width %d, height %d\n", target_x, target_y, width, height);
+    if ((0 == host_win) || !shared_fb_data->display_on || !shared_fb_data->blank_on) {
+        DEBUG(2, "         : no-op, host_win %d, display_on %d, blank_on %d\n", (int)host_win, shared_fb_data->display_on, shared_fb_data->blank_on);
+        return;
+    }
+    DEBUG(2, "         : current viewport x %d, y %d\n", shared_fb_data->viewport_x, shared_fb_data->viewport_y);
+    win_x   = target_x - shared_fb_data->viewport_x;
+    win_y   = target_y - shared_fb_data->viewport_y;
+    if (win_x < 0) {
+        width       += win_x;
+        win_x        = 0;
+    }
+    if (win_y < 0) {
+        height      += win_y;
+        win_y        = 0;
+    }
+    if ((win_x + width) > win_width) {
+        width = win_width - win_x;
+    }
+    if ((win_y + height) > win_height) {
+        height = win_height - win_y;
+    }
+    DEBUG(2, "         : after clipping, target_x %d, target_y %d, width %d, height %d\n", target_x, target_y, width, height);
+    if ((width < 0) || (height < 0)) {
+        return;
+    }
+
+    for (y = 0; y < height; y++) {
+        img_data0       = img_fb + (4 * (win_y + y) * (4 * target_viewport_width)) + (4 * win_x);
+        img_data1       = img_data0 + (4 * target_viewport_width);
+        img_data2       = img_data1 + (4 * target_viewport_width);
+        img_data3       = img_data2 + (4 * target_viewport_width);
+
+        for (x = 0; x < width; x++) {
+            colour  = TARGET_NEXT_COLOUR();
+            *img_data0++  = colour;
+            *img_data0++  = colour;
+            *img_data0++  = colour;
+            *img_data0++  = colour;
+            *img_data1++  = colour;
+            *img_data1++  = colour;
+            *img_data1++  = colour;
+            *img_data1++  = colour;
+            *img_data2++  = colour;
+            *img_data2++  = colour;
+            *img_data2++  = colour;
+            *img_data2++  = colour;
+            *img_data3++  = colour;
+            *img_data3++  = colour;
+            *img_data3++  = colour;
+            *img_data3++  = colour;
+        }
+        TARGET_NEXT_LINE();
+    }
+    schedule_redraw(4 * win_x, 4 * win_y, 4 * width, 4 * height);
+}
+
+#endif
+#ifndef RENDERFN
+
+# define RENDERFN_AUX(_magnification_, _format_) render_ ## _magnification_ ## _ ## _format_
+# define RENDERFN(_magnification_, _format_)     RENDERFN_AUX(_magnification_, _format_)
+
+// ----------------------------------------------------------------------------
+// 1bpp, BE. It is convenient to always render in byte-multiples
+# define TARGET_FORMAT   1BPP_BE
+
+# define TARGET_DATA                                                \
+    unsigned char*  target_fb_current;                              \
+    unsigned int    mask;                                           \
+    width       += target_x & 0x07;                                 \
+    target_x    &= ~0x07;                                           \
+    width        = (width + 7) & ~0x07;                             \
+    target_fb_current   = ((unsigned char*)target_fb) +             \
+        (target_y * target_stride) + (target_x >> 3);               \
+    mask         = 0x0080
+
+# define TARGET_NEXT_COLOUR()                                       \
+    ({                                                              \
+        unsigned int next_colour;                                   \
+        next_colour = host_palette[*target_fb_current & mask];      \
+        mask >>= 1;                                                 \
+        if (0 == mask) {                                            \
+            target_fb_current += 1;                                 \
+            mask               = 0x0080;                            \
+        }                                                           \
+        next_colour;                                                \
+    })
+
+# define TARGET_NEXT_LINE()                                         \
+    target_fb_current += target_stride - (width >> 3)
+
+# include "framebuf.c"
+# undef TARGET_FORMAT
+# undef TARGET_DATA
+# undef TARGET_NEXT_COLOUR
+# undef TARGET_NEXT_LINE
+
+// ----------------------------------------------------------------------------
+// 1bpp, LE
+# define TARGET_FORMAT   1BPP_LE
+
+# define TARGET_DATA                                                \
+    unsigned char*  target_fb_current;                              \
+    unsigned int    mask;                                           \
+    width       += target_x & 0x07;                                 \
+    target_x    &= ~0x07;                                           \
+    width        = (width + 7) & ~0x07;                             \
+    target_fb_current   = ((unsigned char*)target_fb) +             \
+        (target_y * target_stride) + (target_x >> 3);               \
+    mask         = 0x0001
+
+# define TARGET_NEXT_COLOUR()                                       \
+    ({                                                              \
+        unsigned int next_colour;                                   \
+        next_colour = host_palette[*target_fb_current & mask];      \
+        mask <<= 1;                                                 \
+        if (0x0100 == mask) {                                       \
+            target_fb_current += 1;                                 \
+            mask               = 0x0001;                            \
+        }                                                           \
+        next_colour;                                                \
+    })
+
+# define TARGET_NEXT_LINE()                                         \
+    target_fb_current += target_stride - (width >> 3)
+
+# include "framebuf.c"
+# undef TARGET_FORMAT
+# undef TARGET_DATA
+# undef TARGET_NEXT_COLOUR
+# undef TARGET_NEXT_LINE
+
+// ----------------------------------------------------------------------------
+// 2bpp, BE
+# define TARGET_FORMAT   2BPP_BE
+
+# define TARGET_DATA                                                \
+    unsigned char*  target_fb_current;                              \
+    unsigned int    mask;                                           \
+    width       += target_x & 0x03;                                 \
+    target_x    &= ~0x03;                                           \
+    width        = (width + 3) & ~0x03;                             \
+    target_fb_current   = ((unsigned char*)target_fb) +             \
+        (target_y * target_stride) + (target_x >> 2);               \
+    mask         = 0x00C0
+
+# define TARGET_NEXT_COLOUR()                                       \
+    ({                                                              \
+        unsigned int next_colour;                                   \
+        next_colour = host_palette[*target_fb_current & mask];      \
+        mask >>= 2;                                                 \
+        if (0x00 == mask) {                                         \
+            target_fb_current += 1;                                 \
+            mask               = 0x00C0;                            \
+        }                                                           \
+        next_colour;                                                \
+    })
+
+# define TARGET_NEXT_LINE()                                         \
+    target_fb_current += target_stride - (width >> 2)
+
+# include "framebuf.c"
+# undef TARGET_FORMAT
+# undef TARGET_DATA
+# undef TARGET_NEXT_COLOUR
+# undef TARGET_NEXT_LINE
+
+// ----------------------------------------------------------------------------
+// 2bpp, LE
+# define TARGET_FORMAT   2BPP_LE
+
+# define TARGET_DATA                                                \
+    unsigned char*  target_fb_current;                              \
+    unsigned int    mask;                                           \
+    width       += target_x & 0x03;                                 \
+    target_x    &= ~0x03;                                           \
+    width        = (width + 3) & ~0x03;                             \
+    target_fb_current   = ((unsigned char*)target_fb) +             \
+        (target_y * target_stride) + (target_x >> 2);               \
+    mask         = 0x0003
+
+# define TARGET_NEXT_COLOUR()                                       \
+    ({                                                              \
+        unsigned int next_colour;                                   \
+        next_colour = host_palette[*target_fb_current & mask];      \
+        mask <<= 2;                                                 \
+        if (0x0300 == mask) {                                       \
+            target_fb_current += 1;                                 \
+            mask               = 0x0003;                            \
+        }                                                           \
+        next_colour;                                                \
+    })
+
+# define TARGET_NEXT_LINE()                                         \
+    target_fb_current += target_stride - (width >> 2)
+
+# include "framebuf.c"
+# undef TARGET_FORMAT
+# undef TARGET_DATA
+# undef TARGET_NEXT_COLOUR
+# undef TARGET_NEXT_LINE
+
+// ----------------------------------------------------------------------------
+// 4bpp, BE
+# define TARGET_FORMAT   4BPP_BE
+
+# define TARGET_DATA                                                \
+    unsigned char*  target_fb_current;                              \
+    unsigned int    mask;                                           \
+    width       += target_x & 0x01;                                 \
+    target_x    &= ~0x01;                                           \
+    width        = (width + 1) & ~0x01;                             \
+    target_fb_current   = ((unsigned char*)target_fb) +             \
+        (target_y * target_stride) + (target_x >> 1);               \
+    mask         = 0x00F0
+
+# define TARGET_NEXT_COLOUR()                                       \
+    ({                                                              \
+        unsigned int next_colour;                                   \
+        next_colour = host_palette[*target_fb_current & mask];      \
+        mask >>= 4;                                                 \
+        if (0 == mask) {                                            \
+            target_fb_current += 1;                                 \
+            mask               = 0x00F0;                            \
+        }                                                           \
+        next_colour;                                                \
+    })
+
+# define TARGET_NEXT_LINE()                                         \
+    target_fb_current += target_stride - (width >> 1)
+
+# include "framebuf.c"
+# undef TARGET_FORMAT
+# undef TARGET_DATA
+# undef TARGET_NEXT_COLOUR
+# undef TARGET_NEXT_LINE
+
+// ----------------------------------------------------------------------------
+// 4bpp, LE
+# define TARGET_FORMAT   4BPP_LE
+
+# define TARGET_DATA                                                \
+    unsigned char*  target_fb_current;                              \
+    unsigned int    mask;                                           \
+    width       += target_x & 0x01;                                 \
+    target_x    &= ~0x01;                                           \
+    width        = (width + 1) & ~0x01;                             \
+    target_fb_current   = ((unsigned char*)target_fb) +             \
+        (target_y * target_stride) + (target_x >> 1);               \
+    mask         = 0x000F
+
+# define TARGET_NEXT_COLOUR()                                       \
+    ({                                                              \
+        unsigned int next_colour;                                   \
+        next_colour = host_palette[*target_fb_current & mask];      \
+        mask <<= 4;                                                 \
+        if (0x0F00 == mask) {                                       \
+            target_fb_current += 1;                                 \
+            mask               = 0x000F;                            \
+        }                                                           \
+        next_colour;                                                \
+    })
+
+# define TARGET_NEXT_LINE()                                         \
+    target_fb_current += target_stride - (width >> 2)
+
+# include "framebuf.c"
+# undef TARGET_FORMAT
+# undef TARGET_DATA
+# undef TARGET_NEXT_COLOUR
+# undef TARGET_NEXT_LINE
+
+// ----------------------------------------------------------------------------
+// 8bpp, paletted or true colour. In the case of a true colour display the
+// host_palette array will have been filled in appropriately for 332 so
+// conversion to 32-bit true colour again just involves indirecting through
+// the palette, rather than the more expensive bit masking and shifting.
+# define TARGET_FORMAT   8BPP
+
+# define TARGET_DATA                                                \
+    unsigned char*  target_fb_current;                              \
+    target_fb_current   = ((unsigned char*)target_fb) +             \
+        (target_y * target_stride) + target_x
+
+# define TARGET_NEXT_COLOUR() host_palette[*target_fb_current++]
+
+# define TARGET_NEXT_LINE()                                         \
+    target_fb_current += (target_stride - width)
+
+# include "framebuf.c"
+# undef TARGET_FORMAT
+# undef TARGET_DATA
+# undef TARGET_NEXT_COLOUR
+# undef TARGET_NEXT_LINE
+
+// ----------------------------------------------------------------------------
+// 16bpp. Again this is handled via the host_palette array, suitably
+// initialized for either 555 or 565
+# define TARGET_FORMAT   16BPP
+
+# define TARGET_DATA                                                \
+    unsigned short*  target_fb_current;                             \
+    target_fb_current   = ((unsigned short*)target_fb) +            \
+        (target_y * (target_stride >> 1)) + target_x
+
+# define TARGET_NEXT_COLOUR()   host_palette[*target_fb_current++]
+
+# define TARGET_NEXT_LINE()                                         \
+    target_fb_current += ((target_stride >> 1) - width)
+
+# include "framebuf.c"
+# undef TARGET_FORMAT
+# undef TARGET_DATA
+# undef TARGET_NEXT_COLOUR
+# undef TARGET_NEXT_LINE
+
+// ----------------------------------------------------------------------------
+// 32bpp, 0888, no swapping
+
+# define TARGET_FORMAT   32BPP
+
+# define TARGET_DATA                                                \
+    unsigned int*  target_fb_current;                               \
+    target_fb_current   = ((unsigned int*)target_fb) +              \
+        (target_y * (target_stride >> 2)) + target_x
+
+# define TARGET_NEXT_COLOUR() *target_fb_current++ & 0x00FFFFFF
+
+# define TARGET_NEXT_LINE()                                         \
+    target_fb_current += ((target_stride >> 2) - width)
+
+# include "framebuf.c"
+# undef TARGET_FORMAT
+# undef TARGET_DATA
+# undef TARGET_NEXT_COLOUR
+# undef TARGET_NEXT_LINE
+
+// ----------------------------------------------------------------------------
+// 32bpp, 0888, but the host uses 8880.
+# define TARGET_FORMAT   32BPP_SWAPPED
+
+# define TARGET_DATA                                                \
+    unsigned int*  target_fb_current;                               \
+    target_fb_current   = ((unsigned int*)target_fb) +              \
+        (target_y * (target_stride >> 2)) + target_x
+
+# define TARGET_NEXT_COLOUR()                                       \
+    ({                                                              \
+        unsigned int _colour_ = *target_fb_current++;               \
+        _colour_ =                                                  \
+            ((_colour_ & 0x000000FF) << 24) |                       \
+            ((_colour_ & 0x0000FF00) << 16) |                       \
+            ((_colour_ & 0x00FF0000) <<  8);                        \
+        _colour_;                                                   \
+    })
+        
+# define TARGET_NEXT_LINE()                                         \
+    target_fb_current += ((target_stride >> 2) - width)
+
+# include "framebuf.c"
+# undef TARGET_FORMAT
+# undef TARGET_DATA
+# undef TARGET_NEXT_COLOUR
+# undef TARGET_NEXT_LINE
+
+// ----------------------------------------------------------------------------
+// Palette management. 8bpp and 16bpp true colour can be initialized
+// statically. 32bpp does not involve the host_palette array at all.
+// Other formats involve dynamic palette updating.
+
+static void
+palette_initialize_8bpp_332(void)
+{
+    static const unsigned char expand2[4]  = { 0x00, 0x55, 0xAA, 0xFF };
+    static const unsigned char expand3[8]  = { 0x00, 0x20 + 4, 0x40 + 9, 0x60 + 13, 0x80 + 18, 0xA0 + 22, 0xC0 + 27, 0xE0 + 31 };
+    int i;
+    for (i = 0; i < 256; i++) {
+        int r   = (i & 0x00E0) >> 5;
+        int g   = (i & 0x001C) >> 2;
+        int b   = (i & 0x0003) >> 0;
+        host_palette[i] = (expand3[r] << host_r_shift) | (expand3[g] << host_g_shift) | (expand2[b] << host_b_shift);
+    }
+}
+
+static void
+palette_initialize_16bpp_555(void)
+{
+    static const unsigned char expand5[32] = {
+        0x00 + 0, 0x08 + 0, 0x10 + 0, 0x18 + 0, 0x20 + 1, 0x28 + 1, 0x30 + 1, 0x38 + 1,
+        0x40 + 2, 0x48 + 2, 0x50 + 2, 0x58 + 2, 0x60 + 3, 0x68 + 3, 0x70 + 3, 0x78 + 3,
+        0x80 + 4, 0x88 + 4, 0x90 + 4, 0x98 + 4, 0xA0 + 5, 0xA8 + 5, 0xB0 + 5, 0xB8 + 5,
+        0xC0 + 6, 0xC8 + 6, 0xD0 + 6, 0xD8 + 6, 0xE0 + 7, 0xE8 + 7, 0xF0 + 7, 0xF8 + 7,
+    };
+    int i;
+    for (i = 0; i < 65536; i++) {
+        int r = (i & 0x00007C00) >> 10;
+        int g = (i & 0x000003E0) >> 5;
+        int b = (i & 0x0000001F) >> 0;
+        host_palette[i] = (expand5[r] << host_r_shift) | (expand5[g] << host_g_shift) | (expand5[b] << host_b_shift);
+    }
+}
+
+static void
+palette_initialize_16bpp_565(void)
+{
+    static const unsigned char expand5[32] = {
+        0x00 + 0, 0x08 + 0, 0x10 + 0, 0x18 + 0, 0x20 + 1, 0x28 + 1, 0x30 + 1, 0x38 + 1,
+        0x40 + 2, 0x48 + 2, 0x50 + 2, 0x58 + 2, 0x60 + 3, 0x68 + 3, 0x70 + 3, 0x78 + 3,
+        0x80 + 4, 0x88 + 4, 0x90 + 4, 0x98 + 4, 0xA0 + 5, 0xA8 + 5, 0xB0 + 5, 0xB8 + 5,
+        0xC0 + 6, 0xC8 + 6, 0xD0 + 6, 0xD8 + 6, 0xE0 + 7, 0xE8 + 7, 0xF0 + 7, 0xF8 + 7,
+    };
+    static const unsigned char expand6[64] = {
+        0x00 + 0, 0x04 + 0, 0x08 + 0, 0x0C + 0, 0x10 + 0, 0x14 + 0, 0x18 + 0, 0x1C + 0,
+        0x20 + 0, 0x24 + 0, 0x28 + 0, 0x2C + 0, 0x30 + 0, 0x34 + 0, 0x38 + 0, 0x3C + 0,
+        0x40 + 1, 0x44 + 1, 0x48 + 1, 0x4C + 1, 0x50 + 1, 0x54 + 1, 0x58 + 1, 0x5C + 1,
+        0x60 + 1, 0x64 + 1, 0x68 + 1, 0x6C + 1, 0x70 + 1, 0x74 + 1, 0x78 + 1, 0x7C + 1,
+        0x80 + 2, 0x84 + 2, 0x88 + 2, 0x8C + 2, 0x90 + 2, 0x94 + 2, 0x98 + 2, 0x9C + 2,
+        0xA0 + 2, 0xA4 + 2, 0xA8 + 2, 0xAC + 2, 0xB0 + 2, 0xB4 + 2, 0xB8 + 2, 0xBC + 2,
+        0xC0 + 3, 0xC4 + 3, 0xC8 + 3, 0xCC + 3, 0xD0 + 3, 0xD4 + 3, 0xD8 + 3, 0xDC + 3,
+        0xE0 + 3, 0xE4 + 3, 0xE8 + 3, 0xEC + 3, 0xF0 + 3, 0xF4 + 3, 0xF8 + 3, 0xFC + 3,
+    };
+    int i;
+    for (i = 0; i < 65536; i++) {
+        int r = (i & 0x0000F800) >> 11;
+        int g = (i & 0x000007E0) >> 5;
+        int b = (i & 0x0000001F) >> 0;
+        host_palette[i] = (expand5[r] << host_r_shift) | (expand6[g] << host_g_shift) | (expand5[b] << host_b_shift);
+    }
+}
+
+static void
+palette_update(void)
+{
+    int             i, j;
+    unsigned char*  target_palette;
+    int             r, g, b;
+
+    target_palette  = shared_fb_data->palette;
+    for (i = 0; i < (0x01 << target_depth); i++) {
+        r = *target_palette++;
+        g = *target_palette++;
+        b = *target_palette++;
+        host_palette[i] = (r << host_r_shift) | (g << host_g_shift) | (b << host_b_shift);
+    }
+
+    // Make sure the palette is replicated throughout the first 256
+    // entries. That way when rendering <8bpp data we can just mask
+    // the target-side bytes without having to shift.
+    for (j = 0; i < 256; i++, j++) {
+        host_palette[i] = host_palette[j];
+    }
+}
+
+// ----------------------------------------------------------------------------
+// This array is used to map the various display formats etc. on to
+// render functions.
+static struct _render_details {
+    char*           rd_format;
+    unsigned int    rd_endianness_matters;
+    unsigned int    rd_le;
+    void            (*rd_palette_init)(void);
+    void            (*rd_palette_update)(void);
+    void            (*rd_render_fns[4])(int, int, int, int);
+} render_array[] = {
+    // 32BPP must come first
+    { "32BPP_TRUE_0888", 0, 0, NULL, NULL,
+      { &render_1_32BPP, &render_2_32BPP, &render_3_32BPP, &render_4_32BPP }
+    },
+    { "16BPP_TRUE_555",  0, 0, &palette_initialize_16bpp_555, NULL,
+      { &render_1_16BPP, &render_2_16BPP, &render_3_16BPP, &render_4_16BPP }
+    },
+    { "16BPP_TRUE_565",  0, 0, &palette_initialize_16bpp_565, NULL,
+      { &render_1_16BPP, &render_2_16BPP, &render_3_16BPP, &render_4_16BPP }
+    },
+    { "8BPP_TRUE_332",   0, 0, &palette_initialize_8bpp_332, NULL,
+      { &render_1_8BPP, &render_2_8BPP, &render_3_8BPP, &render_4_8BPP }
+    },
+    { "8BPP_PAL888",     0, 0, NULL, &palette_update,
+      { &render_1_8BPP, &render_2_8BPP, &render_3_8BPP, &render_4_8BPP }
+    },
+    { "4BPP_PAL888",     1, 1, NULL, &palette_update,
+      { &render_1_4BPP_LE, &render_2_4BPP_LE, &render_3_4BPP_LE, &render_4_4BPP_LE }
+    },
+    { "4BPP_PAL888",     1, 0, NULL, &palette_update,
+      { &render_1_4BPP_BE, &render_2_4BPP_BE, &render_3_4BPP_BE, &render_4_4BPP_BE }
+    },
+    { "2BPP_PAL888",     1, 1, NULL, &palette_update,
+      { &render_1_2BPP_LE, &render_2_2BPP_LE, &render_3_2BPP_LE, &render_4_2BPP_LE }
+    },
+    { "2BPP_PAL888",     1, 0, NULL, &palette_update,
+      { &render_1_2BPP_BE, &render_2_2BPP_BE, &render_3_2BPP_BE, &render_4_2BPP_BE }
+    },
+    { "1BPP_PAL888",     1, 1, NULL, &palette_update,
+      { &render_1_1BPP_LE, &render_2_1BPP_LE, &render_3_1BPP_LE, &render_4_1BPP_LE }
+    },
+    { "1BPP_PAL888",     1, 0, NULL, &palette_update,
+      { &render_1_1BPP_BE, &render_2_1BPP_BE, &render_3_1BPP_BE, &render_4_1BPP_BE }
+    },
+    { NULL }
+};
+
+
+// ----------------------------------------------------------------------------
+// Communication between host and target
+//
+// When the target wants to wake up the host it sends a single byte down
+// a fifo, typically after having filled in appropriate fields in the
+// shared memory region.
+static void
+handle_target_request(void)
+{
+    unsigned char   buf[1];
+    int             result;
+
+    result  = read(fifo_t2h_fd, buf, 1);
+    if (-1 == result) {
+        if (EINTR == errno) {
+            return;
+        }
+        error("unexpected error %d (%s) reading fifo command from target-side code", errno, strerror(errno));
+    }
+    if (0 == result) {
+        // The target-side must have exited. Do not follow suit yet. Instead
+        // exit only when the I/O auxiliary exits.
+        DEBUG(1, "eCos application has exited\n");
+        close(fifo_t2h_fd);
+        fifo_t2h_fd = -1;
+        return;
+    }
+
+    switch(buf[0]) {
+      case SYNTH_FB_OK:
+        {
+            // The target has finished initializing. This may have
+            // involved filling in the palette
+            DEBUG(1, "target request SYNTH_FB_OK, eCos application has connected.\n");
+            if (palette_update_fn) {
+                (*palette_update_fn)();
+            }
+            break;
+        }
+        
+      case SYNTH_FB_SYNC:
+        {
+            // The target has updated part of the display.
+            DEBUG(2, "target request SYNC, x0 %d, y0 %d, x1 %d, y1 %d\n",
+                  shared_fb_data->sync_x0, shared_fb_data->sync_y0, shared_fb_data->sync_x1, shared_fb_data->sync_y1);
+            (*render_fn)(shared_fb_data->sync_x0, shared_fb_data->sync_y0,
+                         (shared_fb_data->sync_x1 - shared_fb_data->sync_x0),
+                         (shared_fb_data->sync_y1 - shared_fb_data->sync_y0));
+            break;
+        }
+        
+      case SYNTH_FB_WRITE_PALETTE:
+        {
+            // The target-side palette has been updated. Adjust the
+            // host-side palette and then render the whole window with
+            // the curent colours (unless blanked).
+            DEBUG(1, "target request WRITE_PALETTE\n");
+            if (palette_update_fn) {
+                (*palette_update_fn)();
+            }
+            (*render_fn)(shared_fb_data->viewport_x, shared_fb_data->viewport_y, win_width, win_height);
+        }
+
+      case SYNTH_FB_BLANK:
+        {
+            DEBUG(1, "target request blank, display should be %s\n", shared_fb_data->blank_on ? "on" : "off");
+            if (shared_fb_data->blank_on) {
+                (*render_fn)(shared_fb_data->viewport_x, shared_fb_data->viewport_y, win_width, win_height);
+            } else {
+                blackout();
+            }
+            break;
+        }
+        
+      case SYNTH_FB_VIEWPORT:
+        {
+            // Just rerender the whole display as per the new viewport position.
+            DEBUG(1, "target request move viewport to x %d, y %d\n", shared_fb_data->viewport_x, shared_fb_data->viewport_y);
+            (*render_fn)(shared_fb_data->viewport_x, shared_fb_data->viewport_y, win_width, win_height);
+            break;
+        }
+
+      case SYNTH_FB_PAGE_FLIP:
+        {
+            int page_size   = target_height * target_stride;
+            DEBUG(1, "target request page flip to page %d\n", shared_fb_data->page_visible);
+            target_fb       = (void*)(((char*)&(shared_fb_data->framebuf[0])) + (page_size * shared_fb_data->page_visible));
+            (*render_fn)(shared_fb_data->viewport_x, shared_fb_data->viewport_y, win_width, win_height);
+            break;
+        }
+    }
+
+    // Send a single-byte response back to the target
+    DEBUG(2, "target request handled\n");
+    buf[0] = SYNTH_FB_OK;
+    do {
+        result = write(fifo_h2t_fd, buf, 1);
+    } while ((result < 0) && (errno == EINTR));
+    if (result < 0) {
+        error("unexpected error %d (%s) writing fifo status to target-side code", errno, strerror(errno));
+    }
+}
+
+// ----------------------------------------------------------------------------
+// Communication from the Tcl/Tk script
+static void
+handle_mapped(int winid)
+{
+    Status              result;
+    XWindowAttributes   attr;
+    XGCValues           gc_values;
+    Visual*             visual;
+    int                 i;
+
+    DEBUG(1, "X window %d has been mapped\n", winid);
+    if (0 != (int)host_win) {
+        error("  window has already been mapped.\n");
+    }
+    
+    host_win    = (Window)winid;
+    result      = XGetWindowAttributes(host_display, host_win, &attr);
+    if (0 == result) {
+        error("failed to get window attributes.");
+    }
+    gc_values.graphics_exposures    = False;
+    host_gc = XCreateGC(host_display, host_win, GCGraphicsExposures, &gc_values);
+    result = XSelectInput(host_display, host_win, ExposureMask | StructureNotifyMask);
+
+    // The Tcl script has already checked that we are on a 24/32 bit display.
+    // We need to know the colour shifts and possibly adjust the render array.
+    visual  = attr.visual;
+    DEBUG(1, "  red_mask 0x%08lx, green_mask 0x%08lx, blue_mask 0x%08lx\n", visual->red_mask, visual->green_mask, visual->blue_mask);
+    if ((0x00FF0000 == visual->red_mask) && (0x0000FF00 == visual->green_mask) && (0x000000FF == visual->blue_mask)) {
+        // 0888, nothing special needed
+        host_r_shift    = 16;
+        host_g_shift    =  8;
+        host_b_shift    =  0;
+    } else if ((0x0000FF00 == visual->red_mask) && (0x00FF0000 == visual->green_mask) && (0xFF000000 == visual->blue_mask)) {
+        // 8880
+        host_r_shift    =  8;
+        host_g_shift    = 16;
+        host_b_shift    = 24;
+        render_array[0].rd_render_fns[0]    = &render_1_32BPP_SWAPPED;
+        render_array[0].rd_render_fns[1]    = &render_2_32BPP_SWAPPED;
+        render_array[0].rd_render_fns[2]    = &render_3_32BPP_SWAPPED;
+        render_array[0].rd_render_fns[3]    = &render_4_32BPP_SWAPPED;
+    }
+    
+    // Time to figure out which render function etc. to use.
+    render_fn = (void (*)(int, int, int, int)) NULL;
+    for (i = 0; render_array[i].rd_format; i++) {
+        if ((0 == strcmp(render_array[i].rd_format, target_format)) &&
+            (!render_array[i].rd_endianness_matters || (render_array[i].rd_le == target_le))) {
+
+            render_fn           = render_array[i].rd_render_fns[config_magnification - 1];
+            palette_init_fn     = render_array[i].rd_palette_init;
+            palette_update_fn   = render_array[i].rd_palette_update;
+            break;
+        }
+    }
+    if (NULL == render_fn) {
+        error("Target format not supported.");
+    }
+
+    // Now it is possible to create the XImage structure, the fifos,
+    // and the shared memory region for interaction with the target.
+    // The XImage needs to be large enough for the viewport. That may
+    // be larger than the actually visible window, but the window may
+    // get resized.
+    host_image  = XCreateImage(host_display, visual,
+                               24,          // image depth. 24 bits of colour info.
+                               ZPixmap,
+                               0,           // offset
+                               NULL,        // data, filled in later
+                               target_viewport_width  * config_magnification,
+                               target_viewport_height * config_magnification,
+                               32,          // bitmap_pad
+                               0            // bytes_per_line, calculated by X
+        );
+    if (NULL == host_image) {
+        error("Failed to allocate XImage structure.");
+    }
+    host_image->data    = (void*)img_fb;
+
+    x_win_width     = attr.width;
+    x_win_height    = attr.height;
+    win_width       = (x_win_width  + config_magnification - 1) / config_magnification;
+    win_height      = (x_win_height + config_magnification - 1) / config_magnification;
+    DEBUG(1, "  mapped window, X width %d, X height %d, win width %d, win height %d, blank on %d, display on %d\n",
+          x_win_width, x_win_height, win_width, win_height, shared_fb_data->blank_on, shared_fb_data->display_on);
+
+    // The palette may get initialized locally or by the target, depending
+    // on the mode.
+    if (palette_init_fn) {
+        (*palette_init_fn)();
+    }
+    if (palette_update_fn) {
+        (*palette_update_fn)();
+    }
+    if (shared_fb_data->display_on && shared_fb_data->blank_on) {
+        (*render_fn)(shared_fb_data->viewport_x, shared_fb_data->viewport_y, win_width, win_height);
+    } else {
+        // Just draw the initial blank screen.
+        blackout();
+    }
+}
+
+static void
+handle_auxiliary_request(void)
+{
+    synth_fb_auxiliary_request  req;
+    int                         result;
+    
+    result = read(0, &req, sizeof(synth_fb_auxiliary_request));
+    if (result <= 0) {
+        // The I/O auxiliary has terminated, so assume the window has gone as well.
+        exit(0);
+    }
+    DEBUG(2, "handle_auxiliary request %d\n", req.command);
+    switch (req.command) {
+      case SYNTH_FB_AUX_MAPPED:
+        {
+            handle_mapped(req.arg1);
+            break;
+        }
+      case SYNTH_FB_AUX_ON:
+        {
+            // This is used when the target-side switches the display
+            // off and back on, rather than just blanking it. Treat it
+            // the same as blanking.
+            DEBUG(1, "Target has switched the display on\n");
+            shared_fb_data->display_on  = 1;
+            (*render_fn)(shared_fb_data->viewport_x, shared_fb_data->viewport_y, win_width, win_height);
+            break;
+        }
+      case SYNTH_FB_AUX_OFF:
+        {
+            DEBUG(1, "Target has switched the display off\n");
+            shared_fb_data->display_on  = 0;
+            blackout();
+            break;
+        }
+      case SYNTH_FB_AUX_REDRAW:
+        {
+            DEBUG(1, "Auxiliary has requested a redraw\n");
+            schedule_redraw(0, 0, x_win_width, x_win_height);
+        }
+    }
+    DEBUG(2, "handle_auxiliary request done\n");
+}
+
+// Report an error to ecosynth during initialization. This means a
+// single byte 0, followed by a string.
+static void
+report_init_error(char* msg)
+{
+    write(1, "0", 1);
+    write(1, msg, strlen(msg));
+    close(1);
+    exit(0);
+}
+
+// ----------------------------------------------------------------------------
+int
+main(int argc, char** argv)
+{
+    int                 size;
+    fd_set              read_fds;
+    int                 max_fd;
+
+    atexit(&atexit_handler);
+    signal(SIGPIPE, SIG_IGN);
+
+    if (12 != argc) {
+        report_init_error("Incorrect number of arguments.");
+    }
+    target_id               = (int) strtoul(argv[1], NULL, 0);
+    target_depth            = (int) strtoul(argv[2], NULL, 0);
+    target_le               = (int) strtoul(argv[3], NULL, 0);
+    target_width            = (int) strtoul(argv[4], NULL, 0);
+    target_height           = (int) strtoul(argv[5], NULL, 0);
+    target_viewport_width   = (int) strtoul(argv[6], NULL, 0);
+    target_viewport_height  = (int) strtoul(argv[7], NULL, 0);
+    target_stride           = (int) strtoul(argv[8], NULL, 0);
+    target_number_pages     = (int) strtoul(argv[9], NULL, 0);
+    target_format           = argv[10];
+    config_magnification    = (int) strtoul(argv[11], NULL, 0);
+
+    if ((target_depth != 1) && (target_depth != 2) && (target_depth != 4) && (target_depth != 8) && (target_depth != 16) && (target_depth != 32)) {
+        report_init_error("Invalid target depth.");
+    }
+    if ((target_width < 16) || (target_width > 4096)) {
+        report_init_error("Invalid target width.");
+    }
+    if ((target_height < 16) || (target_height > 4096)) {
+        report_init_error("Invalid target height.");
+    }
+    if ((target_viewport_width < 16) || (target_viewport_width > target_width)) {
+        report_init_error("Invalid target viewport width.");
+    }
+    if ((target_viewport_height < 16) || (target_viewport_height > target_height)) {
+        report_init_error("Invalid target viewport height.");
+    }
+    if ((target_number_pages < 1) || (target_number_pages > 4)) {
+        report_init_error("Invalid target number of pages.");
+    }
+    if ((config_magnification < 1) || (config_magnification > 4)) {
+        report_init_error("Invalid config magnification.");
+    }
+
+    host_display    = XOpenDisplay(NULL);
+    if (NULL == host_display) {
+        report_init_error("Failed to open X display.");
+    }
+    img_fb = (unsigned int*) malloc(target_viewport_width * target_viewport_height * sizeof(int) * config_magnification * config_magnification);
+    if (NULL == img_fb) {
+        report_init_error("Failed to allocate XImage data.");
+    }
+    blackout();
+
+    // Use of tmpnam() is generally discouraged and generates a linker
+    // warning, but only three temporary file names are needed and
+    // there are no root privileges involved so security is not a big
+    // issue. mkstemp() cannot easily be used with fifos.
+    if (NULL == tmpnam(fifo_t2h_name)) {
+        report_init_error("Failed to create unique file name for target->host fifo.");
+    }
+    if (0 != mkfifo(fifo_t2h_name, S_IRUSR | S_IWUSR)) {
+        report_init_error("Failed to create target->host fifo.");
+    }
+    // Opening O_RDONLY or O_WRONLY will result in blocking until the
+    // other end is open as well, which is not what is wanted here.
+    // Instead we use the Linux feature of opening with O_RDWR which
+    // gives non-blocking behaviour.
+    fifo_t2h_created    = 1;
+    fifo_t2h_fd         = open(fifo_t2h_name, O_RDWR);
+    if (-1 == fifo_t2h_fd) {
+        report_init_error("Failed to open target->host fifo.");
+    }
+    if (NULL == tmpnam(fifo_h2t_name)) {
+        report_init_error("Failed to create unique file name for host->target fifo.");
+    }
+    if (0 != mkfifo(fifo_h2t_name, S_IRUSR | S_IWUSR)) {
+        report_init_error("Failed to create host->target fifo.");
+    }
+    fifo_h2t_created    = 1;
+    fifo_h2t_fd         = open(fifo_h2t_name, O_RDWR);
+    if (-1 == fifo_h2t_fd) {
+        report_init_error("Failed to open target->host fifo.");
+    }
+
+    size    = sizeof(synth_fb_data) + (target_height * target_stride * target_number_pages);
+    if (NULL == tmpnam(shm_name)) {
+        report_init_error("Failed to create unique file name for shared memory.");
+    }
+    shm_fd  = open(shm_name, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
+    if (shm_fd < 0) {
+        report_init_error("Failed to open file for shared memory region.");
+    }
+    shm_created = 1;
+    if (ftruncate(shm_fd, size) < 0) {
+        report_init_error("Failed to set shared memory file size.");
+    }
+    
+    shared_fb_data = (synth_fb_data*)mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, shm_fd, 0);
+    if (shared_fb_data == (synth_fb_data*)MAP_FAILED) {
+        report_init_error("Failed to mmap shared memory file.");
+    }
+    target_fb   = &(shared_fb_data->framebuf[0]);
+
+    shared_fb_data->connected           = 0;
+    shared_fb_data->fifo_to_framebuf    = -1;
+    shared_fb_data->fifo_from_framebuf  = -1;
+    shared_fb_data->devid               = target_id;
+    shared_fb_data->sync_x0             = 0;
+    shared_fb_data->sync_y0             = 0;
+    shared_fb_data->sync_x1             = target_viewport_width;
+    shared_fb_data->sync_y1             = target_viewport_height;
+    shared_fb_data->display_on          = 0;
+    shared_fb_data->blank_on            = 1;
+    shared_fb_data->viewport_x          = 0;
+    shared_fb_data->viewport_y          = 0;
+    shared_fb_data->page_visible        = 0;
+
+    render_fn   = &dummy_render_fn;
+    msync(shared_fb_data, size, MS_SYNC);
+
+    // Everything seems to be in order. Report back to the auxiliary.
+    {
+        char    buf[513];
+        if ((strlen(shm_name) + strlen(fifo_t2h_name) + strlen(fifo_h2t_name) + 3) > 512) {
+            report_init_error("Temporary path names too long.");
+        }
+        buf[0]  = '1';
+        strcpy(&(buf[1]), shm_name);
+        strcat(&(buf[1]), ";");
+        strcat(&(buf[1]), fifo_t2h_name);
+        strcat(&(buf[1]), ";");
+        strcat(&(buf[1]), fifo_h2t_name);
+        strcat(&(buf[1]), ";");
+        write(1, buf, 2 + strlen(&(buf[1])));
+    }
+    
+    // Now we just loop, processing events. We want to select on file descriptor
+    // 0 from the auxiliary, the X file descriptor, and the fifo t2h descriptor.
+    // The latter may go away. X should never go away, and if the auxiliary goes
+    // away we exit immediately.
+    max_fd  = MAX(ConnectionNumber(host_display), fifo_t2h_fd);
+    while ( 1 ) {
+        while (XPending(host_display) > 0) {
+            handle_X_event();
+        }
+        FD_ZERO(&read_fds);
+        FD_SET(0, &read_fds);
+        FD_SET(ConnectionNumber(host_display), &read_fds);
+        if (-1 != fifo_t2h_fd) {
+            FD_SET(fifo_t2h_fd, &read_fds);
+        }
+        DEBUG(3, "framebuf main loop: selecting on 0x%08x\n", *(int*)&read_fds);
+        do_redraw();
+        if (select(max_fd + 1, &read_fds, NULL, NULL, NULL) >= 0) {
+            if (FD_ISSET(0, &read_fds)) {
+                DEBUG(2, "framebuf main loop: auxiliary request\n");
+                handle_auxiliary_request();
+            }
+            if ((-1 != fifo_t2h_fd) && FD_ISSET(fifo_t2h_fd, &read_fds)) {
+                DEBUG(2, "framebuf main loop: target request\n");
+                handle_target_request();
+            }
+            if (FD_ISSET(ConnectionNumber(host_display), &read_fds)) {
+                DEBUG(3, "framebuf main loop: X request\n");
+                (void)XEventsQueued(host_display, QueuedAfterReading);
+            }
+        }
+    }
+    
+    exit(EXIT_SUCCESS);
+}
+#endif // INSTANTIATE_CONVERTER
new file mode 100644
--- /dev/null
+++ b/packages/devs/framebuf/synth/current/host/framebuf.tcl
@@ -0,0 +1,373 @@
+# {{{  Banner                                                   
+
+# ============================================================================
+# 
+#      framebuf.tcl
+# 
+#      Framebuffer support for the eCos synthetic target I/O auxiliary
+# 
+# ============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+# -------------------------------------------
+# This file is part of eCos, the Embedded Configurable Operating System.
+# Copyright (C) 2008 Free Software Foundation, Inc.
+#
+# eCos 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.
+#
+# eCos 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 eCos; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+#
+# As a special exception, if other files instantiate templates or use macros
+# or inline functions from this file, or you compile this file and link it
+# with other works to produce a work based on this file, this file does not
+# by itself cause the resulting work to be covered by the GNU General Public
+# License. However the source code for this file must still be made available
+# in accordance with section (3) of the GNU General Public License.
+#
+# This exception does not invalidate any other reasons why a work based on
+# this file might be covered by the GNU General Public License.
+# -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ============================================================================
+# #####DESCRIPTIONBEGIN####
+# 
+#  Author(s):   bartv
+#  Contact(s):  bartv
+#  Date:        2005/10/28
+#  Version:     0.01
+#  Description:
+#      Implementation of a framebuffer device. This script should only ever
+#      be run from inside the ecosynth auxiliary.
+# 
+# ####DESCRIPTIONEND####
+# ============================================================================
+
+# }}}
+
+# Overview
+#
+# The synthetic framebuffer package supports up to four framebuffer
+# devices. The eCos framebuffers are displayed by a separate C program
+# framebuf which gets spawned by this script. framebuf operates using
+# low-level X library calls. Doing the drawing inside Tcl/Tk would be
+# far too slow, and trying to draw directly to an X display from inside
+# an eCos application would be complicated.
+#
+# When an eCos framebuffer is switched on for the first time it will
+# result in a device instantiation in this script. A suitable frame
+# is created, and once it is mapped the framebuf program is started.
+# The device data string from the target includes a protocol version
+# number, target display depth, width and height, display format, etc.
+
+namespace eval framebuf {
+
+    # Protocol between the target-side and the auxiliary, as per protocol.h
+    variable    SYNTH_FB_INIT       0x01
+    variable    SYNTH_FB_ABORT      0x02
+    variable    SYNTH_FB_ON         0x03
+    variable    SYNTH_FB_OFF        0x04
+
+    # Protocol between the auxiliary and the framebuf program
+    variable    SYNTH_FB_AUX_MAPPED 0x01
+    variable    SYNTH_FB_AUX_ON     0x02
+    variable    SYNTH_FB_AUX_OFF    0x03
+    variable    SYNTH_FB_AUX_REDRAW 0x04
+    
+    variable 	init_ok		1
+    array set	settings	[]
+
+    # Set DEBUG_LEVEL to between 0 for no debug output, 2 for maximum
+    variable    DEBUG_LEVEL 0
+    proc DEBUG { level devid msg } {
+        if { $level < $framebuf::DEBUG_LEVEL } {
+            if { [info exists framebuf::settings($devid,fbid)] } {
+                set fbid $framebuf::settings($devid,fbid)
+            } else {
+                set fbid "<unknown>"
+            }
+            puts -nonewline stderr "framebuf.tcl (fb$fbid): $msg"; flush stderr
+        }
+    }
+    
+    # One-off initialization.
+    variable install_dir	$synth::device_install_dir
+    variable framebuf_executable [file join $framebuf::install_dir "framebuf"]
+    if { ! [file exists $framebuf_executable] } {
+        synth::report_error "Framebuffer device, framebuf executable has not been installed in $framebuf::install_dir.\n"
+        set init_ok 0
+    } elseif { ! [file executable $framebuf_executable] } {
+        synth::report_error "Framebuffer device, installed program $framebuf_executable is not executable.\n"
+        set init_ok 0
+    }
+
+    if { ! [file exists [file join $framebuf::install_dir "framebuf_icon.xbm"]] ||
+         ! [file exists [file join $framebuf::install_dir "framebuf_iconmask.xbm"]] } {
+        synth::report_error "Framebuffer device, bitmap support files have not been installed.\n"
+        set init_ok =
+    }
+
+    # A default function for creating the Tk frame for an eCos
+    # framebuffer device. Framebuffer 0 is usually part of the
+    # main window, unless it would take up too much space.
+    # Unfortunately at this stage of initialization there is no
+    # easy way to work out how big . is going to be so some
+    # hard-wired numbers are used instead.
+    proc default_create_frame { fbid magnification depth little_endian width height viewport_width viewport_height stride number_pages format } {
+
+        puts "default_create_frame $fbid mag $magnification width $viewport_width height $viewport_height"
+        set viewport_width [expr $viewport_width * $magnification]
+        set viewport_height [expr $viewport_height * $magnification]
+        puts "default_create_frame $fbid mag $magnification width $viewport_width height $viewport_height"
+        
+        if { (0 == $fbid) && ($viewport_height <= 240) && ($viewport_width <= 640) } {
+            frame           .fb$fbid -container 1 -height $viewport_height -width $viewport_width
+            pack            .fb$fbid -in .main.n -expand 0 -anchor nw
+            return          .fb$fbid
+        } else {
+            toplevel        .fb$fbid
+            frame           .fb$fbid.frame -container 1 -height $viewport_height -width $viewport_width
+            pack            .fb$fbid.frame -side top -expand 0 -anchor nw
+            wm title        .fb$fbid	"Synth FB[set fbid] [set width]*[set height]*[set depth]bpp"
+            wm iconbitmap   .fb$fbid "@[file join $framebuf::install_dir framebuf_icon.xbm]"
+            wm iconmask     .fb$fbid "@[file join $framebuf::install_dir framebuf_iconmask.xbm]"
+            wm iconname     .fb$fbid "Synth FB[set fbid]"
+            wm protocol     .fb$fbid WM_DELETE_WINDOW { }
+            return .fb$fbid.frame
+        }
+    }
+
+    variable create_frame_proc	default_create_frame
+    
+    if { [synth::tdf_has_option "framebuf" "create_frame_proc"] } {
+        set framebuf::create_frame_proc [synth::tdf_get_option "framebuf" "create_frame_proc"]
+    }
+
+    # Optional magnification
+    for { set i 0 } { $i < 4 } { incr i } {
+        set framebuf::settings(fb$i,magnification) 1
+        if { [synth::tdf_has_option "framebuf" "fb[set i]_magnification"] } {
+            set magnification [synth::tdf_get_option "framebuf" "fb[set i]_magnification"]
+            if { ! [string is integer -strict $magnification] } {
+                synth::report_error [concat
+                                     "Framebuf device, invalid value in target definition file $synth::target_definition\n"
+                                     "    fb[set i]_magnification should be a simple integer, not $magnification\n"]
+                set init_ok 0
+            } elseif { ($magnification < 1) || ($magnification > 4) } {
+                synth::report_error [concat
+                                     "Framebuf device, invalid value in target definition file $synth::target_definition\n"
+                                     "    fb[set i]_magnification should be 1, 2, 3 or 4.\n"]
+                set init_ok 0
+            } else {
+                set framebuf::settings(fb$i,magnification) $magnification
+            }
+        }
+    }
+
+    proc handle_framebuf_reply { devid } {
+        DEBUG 1 $devid "reading reply from framebuf program\n"
+        if { ! $framebuf::settings($devid,got_reply) } {
+            # The first message from the framebuf program indicates success+pathnames or failure+message
+            # This will wake up a vwait in the instantiate proc
+            set framebuf::settings($devid,reply) [read $framebuf::settings($devid,fd)]
+            set framebuf::settings($devid,got_reply) 1
+        } else {
+            # The framebuf program sends back no other data, but may issue warnings or failures
+            synth::report [read $framebuf::settings($devid,fd)]
+        }
+    }
+    
+    proc send_framebuf_request { devid code arg1 arg2 } {
+        # FIXME handle endianness
+        set auxiliary_request [binary format iii $code $arg1 $arg2]
+        puts -nonewline $framebuf::settings($devid,fd) $auxiliary_request
+        flush $framebuf::settings($devid,fd)
+    }
+    
+    proc handle_ecos_request { devid reqcode arg1 arg2 reqdata reqlen reply_len } {
+        DEBUG 1 $devid "got request $reqcode from eCos application\n"
+        if { $framebuf::SYNTH_FB_INIT == $reqcode } {
+            # This request is used after instantiation to get hold of the connectivity information
+            synth::send_reply 1 [string length $framebuf::settings($devid,connectivity)] $framebuf::settings($devid,connectivity)
+        } elseif { $framebuf::SYNTH_FB_ABORT == $reqcode } {
+            # FIXME: kill off the framebuf program? Destroy the window/frame?
+            synth::report_error "framebuf: eCos application has failed to connect to host-side framebuf program"
+            synth::report_error "        : graphical display is not operational"
+        } elseif { $framebuf::SYNTH_FB_ON == $reqcode } {
+            send_framebuf_request $devid $framebuf::SYNTH_FB_AUX_ON 0 0
+        } elseif { $framebuf::SYNTH_FB_OFF == $reqcode } {
+            send_framebuf_request $devid $framebuf::SYNTH_FB_AUX_OFF 0 0
+        } else {
+            synth::report_error "framebuf: got invalid request $reqcode from eCos application"
+        }
+    }
+    
+    proc mapped { devid } {
+        DEBUG 1 $devid "frame has been mapped\n"
+        bind $framebuf::settings($devid,frame) <Map> ""
+        send_framebuf_request $devid $framebuf::SYNTH_FB_AUX_MAPPED [winfo id $framebuf::settings($devid,frame)] 0
+        # This should not be necessary, but sometimes there are problems
+        # with an initial XPutImage() not actually drawing anything.
+        after 250 framebuf::send_framebuf_request $devid $framebuf::SYNTH_FB_AUX_REDRAW 0 0
+    }
+    
+    proc instantiate { devid name data } {
+
+        DEBUG 1 $devid "instantiate devid $devid, name $name, data $data\n"
+        
+        if { ! $synth::flag_gui } {
+            # If we are not running under a windowing system we cannot
+            # show the framebuffer data. Just stuck to the default
+            # memory framebuffer.
+            return ""
+        }
+
+        if { [info exists framebuf::settings($name,id)] } {
+            synth::report_error "Framebuf device: attempt to create several $name instances\n"
+            return ""
+        }
+
+        # Check that the framebuf program can actually handle this display.
+        set depth [winfo depth .]
+        if { (24 != $depth) && (32 != $depth) } {
+            synth::report_error "Framebuf device: requires 24bpp or 32bpp X display\n"
+            return ""
+        }
+        set visual [winfo visual .]
+        if { ![string equal "truecolor" $visual] && ![string equal "directcolor" $visual] } {
+            synth::report_error "Framebuf device: requires a truecolor or directcolor X display\n"
+            return ""
+        }
+        
+        # Data is a set of comma-separated parameters, mostly numeric,
+        # describing the desired framebuffer device. The first number
+        # is a protocol number as per ../src/protocol.h
+        set junk 	""
+        set protocol 	0
+        if { ! [regexp -- {^(\d*),.*} $data junk protocol] } {
+            synth::report_error "Framebuf device: missing protocol number for device $name\n"
+            return ""
+        }
+        if { $protocol != 1 } {
+            synth::report_error "Framebuf device: protocol mismatch\n    \
+                     Target uses protocol version $protocol\n    \
+                     Host is only up to version 1\n"
+            return ""
+        }
+        set framebuf::settings($devid,name) $name
+        set result [regexp -- {^(\d*),(\d*),(\d*),(\d*),(\d*),(\d*),(\d*),(\d*),(\d*),(\d*),(.*)$} $data junk protocol \
+                        framebuf::settings($devid,fbid) \
+                        framebuf::settings($devid,depth) \
+                        framebuf::settings($devid,little_endian) \
+                        framebuf::settings($devid,width) \
+                        framebuf::settings($devid,height) \
+                        framebuf::settings($devid,viewport_width) \
+                        framebuf::settings($devid,viewport_height) \
+                        framebuf::settings($devid,stride) \
+                        framebuf::settings($devid,number_pages) \
+                        framebuf::settings($devid,format)]
+        if { ! $result } {
+            synth::report_error "Framebuf device: invalid parameter string $data\n"
+            return ""
+        }
+        set framebuf::settings($devid,magnification) $framebuf::settings(fb$framebuf::settings($devid,fbid),magnification)
+
+        # Spawn the framebuf process. Its stdin and stdout are pipes
+        # connected to ecosynth. Its stderr is redirected to the current
+        # tty for debugging/diagnostics.
+        set cmd "|$framebuf::framebuf_executable "
+        append cmd "$framebuf::settings($devid,fbid) "
+        append cmd "$framebuf::settings($devid,depth) "
+        append cmd "$framebuf::settings($devid,little_endian) "
+        append cmd "$framebuf::settings($devid,width) "
+        append cmd "$framebuf::settings($devid,height) "
+        append cmd "$framebuf::settings($devid,viewport_width) "
+        append cmd "$framebuf::settings($devid,viewport_height) "
+        append cmd "$framebuf::settings($devid,stride) "
+        append cmd "$framebuf::settings($devid,number_pages) "
+        append cmd "$framebuf::settings($devid,format) "
+        append cmd "$framebuf::settings($devid,magnification) "
+
+        DEBUG 1 $devid "spawning framebuf program : $cmd\n"
+        if { [catch { set framebuf::settings($devid,fd) [open "$cmd 2>/dev/tty" "w+"] } message] } {
+            synth::report_error "Failed to spawn framebuf process for device $name\n    $message"
+            return ""
+        }
+        set framebuf::settings($devid,reply) 0
+        set framebuf::settings($devid,got_reply) 0
+        fconfigure $framebuf::settings($devid,fd) -translation binary -blocking 0
+        fileevent $framebuf::settings($devid,fd) readable "framebuf::handle_framebuf_reply $devid"
+        
+        # Now wait for the framebuf device to initialize. It should send back a single byte,
+        # 0 for failure followed by an error string, 1 for success followed by a string with
+        # the connectivity information.
+        DEBUG 1 $devid "waiting for initial reply from framebuf program\n"
+        vwait framebuf::settings($devid,reply)
+        if { "" == $framebuf::settings($devid,reply) } {
+            synth::report_error "framebuf process for device $name exited unexpectedly.\n"
+            catch { close $framebuf::settings($devid,fd) }
+            return ""
+        }
+        set code [string index $framebuf::settings($devid,reply) 0]
+        if { "0" == $code } {
+            synth::report_error "framebuf process was unable to initialize eCos device $name\n    $message"
+            catch { close $framebuf::settings($devid,fd) }
+            return ""
+        }
+        if { "1" !=  $code } {
+            synth::report_error "Unexpected response $code from framebuf process for eCos device $name\n"
+            catch { close $framebuf::settings($devid,fd) }
+            return ""
+        }
+        set framebuf::settings($devid,connectivity) [string range $framebuf::settings($devid,reply) 1 end]
+
+        # Now the the framebuf program is up and running, create the frame.
+        # Doing this earlier could result in spurious frames appearing if
+        # the framebuf program failed, and also causes timing problems
+        # between the <Map> binding and the framebuf program being ready.
+        DEBUG 1 $devid "invoking create_frame procedure $framebuf::create_frame_proc\n"
+        set framebuf::settings($devid,frame)                  	\
+            [$framebuf::create_frame_proc                   	\
+                 $framebuf::settings($devid,fbid)           	\
+                 $framebuf::settings($devid,magnification)   	\
+                 $framebuf::settings($devid,depth)           	\
+                 $framebuf::settings($devid,little_endian)   	\
+                 $framebuf::settings($devid,width)           	\
+                 $framebuf::settings($devid,height)          	\
+                 $framebuf::settings($devid,viewport_width)  	\
+                 $framebuf::settings($devid,viewport_height) 	\
+                 $framebuf::settings($devid,stride)          	\
+                 $framebuf::settings($devid,number_pages)    	\
+                 $framebuf::settings($devid,format)          	\
+                ]
+        DEBUG 1 $devid "frame is $framebuf::settings($devid,frame)\n"
+        if { "" == $framebuf::settings($devid,frame) } {
+            return ""
+        }
+
+        # Everything appears to be up and running. When the frame becomes visible,
+        # inform the framebuf program.
+        if { [winfo ismapped $framebuf::settings($devid,frame)] } {
+            framebuf::mapped $devid
+        } else {
+            bind $framebuf::settings($devid,frame) <Map>        "framebuf::mapped $devid"
+        }
+        DEBUG 1 $devid "instantiate succeeded, connectivity $framebuf::settings($devid,connectivity)\n"
+
+        return framebuf::handle_ecos_request
+    }
+}
+
+if { $framebuf::init_ok } {
+    return framebuf::instantiate
+} else {
+    synth::report "Framebuffer cannot be instantiated, initialization failed.\n"
+    return ""
+}
new file mode 100644
--- /dev/null
+++ b/packages/devs/framebuf/synth/current/host/framebuf.tdf
@@ -0,0 +1,37 @@
+# Target definition file fragment for framebuffer devices.
+#
+# The main support available is for controlled creation
+# of the Tk frames in which the eCos framebuffer data will
+# be displayed. By default the main framebuf.tcl script will
+# create the 
+
+proc my_framebuf_create_frame { id magnification depth little_endian width height viewport_width viewport_height stride number_pages format} {
+
+    toplevel 		.ecosfb$id
+    wm title 		.ecosfb$id	"eCos FB[set id]: $width*$height*\#depth"
+    wm iconbitmap	.ecosfb$id	$framebuf::image_framebuf_icon
+    wm iconmask		.ecosfb$id	$framebuf::image_framebufmask_icon
+    wm protocol		.ecosfb$id	""
+
+    frame .ecosfb$id.frame -container 1 -height [expr $magnification * $viewport_height] -width [expr $magnification * $viewport_width]
+    pack  .ecosfb$id.frame -side top -expand 0
+
+    return .ecosfb$id.frame
+}
+
+synth_device framebuf {
+
+    # Customize how the eCos framebuffer appears on the X display.
+    # The argument should be a function which takes a long list of
+    # arguments, as above, and returns a Tk frame id. Spawning the
+    # C program is still the responsibility of the main framebuf.tcl
+    # script.
+    create_frame_proc	my_framebuf_create_frame
+
+    # Optional magnification for all four permitted framebuffer
+    # devices. Magnification can be 1, 2, 3 or 4
+    # fb0_magnification 2
+    # fb1_magnification 4
+    # fb2_magnification 3
+    # fb4_magnification 1
+}
new file mode 100644
--- /dev/null
+++ b/packages/devs/framebuf/synth/current/host/framebuf_icon.xbm
@@ -0,0 +1,10 @@
+#define framebuf_icon_width 40
+#define framebuf_icon_height 16
+static unsigned char framebuf_icon_bits[] = {
+   0xfc, 0xff, 0xff, 0xff, 0x3f, 0x06, 0x00, 0x00, 0x00, 0x60, 0x03, 0x00,
+   0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x80, 0xc1, 0x54, 0xba, 0xe2,
+   0x86, 0x21, 0x55, 0x92, 0x22, 0x8a, 0x21, 0xd4, 0x92, 0x22, 0x8a, 0xc1,
+   0xd4, 0x92, 0xe3, 0x86, 0x01, 0x49, 0x93, 0x22, 0x8a, 0x01, 0x49, 0x93,
+   0x22, 0x8a, 0x21, 0x49, 0x92, 0x22, 0x8a, 0xc1, 0x48, 0x92, 0x22, 0x86,
+   0x01, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0xc0, 0x06, 0x00,
+   0x00, 0x00, 0x60, 0xfc, 0xff, 0xff, 0xff, 0x3f};
new file mode 100644
--- /dev/null
+++ b/packages/devs/framebuf/synth/current/host/framebuf_iconmask.xbm
@@ -0,0 +1,10 @@
+#define ecosiconmask_width 40
+#define ecosiconmask_height 16
+static unsigned char ecosiconmask_bits[] = {
+   0xfc, 0xff, 0xff, 0xff, 0x3f, 0xfe, 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, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff,
+   0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0x3f};
new file mode 100644
--- /dev/null
+++ b/packages/devs/framebuf/synth/current/misc/example.c
@@ -0,0 +1,374 @@
+//==========================================================================
+//
+//      example.c
+//
+//      Demonstration of the synthetic target framebuffer capabilities
+//
+//==========================================================================
+//###ECOSGPLCOPYRIGHTBEGIN####
+//-------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2008 Free Software Foundation, Inc.
+// eCos 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.
+//
+// eCos 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 eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//###DESCRIPTIONBEGIN####
+//
+// Author(s):     bartv
+// Date:          2008-10-06
+//
+//###DESCRIPTIONEND####
+//========================================================================
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/diag.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/io/framebuf.h>
+#include <cyg/kernel/kapi.h>
+#include <string.h>
+#include <stdio.h>
+
+#define BLACK        colours[0x00]
+#define BLUE         colours[0x01]
+#define GREEN        colours[0x02]
+#define CYAN         colours[0x03]
+#define RED          colours[0x04]
+#define MAGENTA      colours[0x05]
+#define BROWN        colours[0x06]
+#define LIGHTGREY    colours[0x07]
+#define DARKGREY     colours[0x08]
+#define LIGHTBLUE    colours[0x09]
+#define LIGHTGREEN   colours[0x0A]
+#define LIGHTCYAN    colours[0x0B]
+#define LIGHTRED     colours[0x0C]
+#define LIGHTMAGENTA colours[0x0D]
+#define YELLOW       colours[0x0E]
+#define WHITE        colours[0x0F]
+
+// ----------------------------------------------------------------------------
+// FB0. 320x240 32bpp true 0888. Just draw a simple image as per the fb.c
+// example and return to main().
+
+static void
+fb0_thread(cyg_addrword_t arg)
+{
+#define FRAMEBUF cyg_synth_fb0    
+    static cyg_ucount32 colours[16];
+    cyg_ucount16 block_width;
+    int i;
+    
+    for (i = 0; i < 16; i++) {
+        colours[i]  = cyg_fb_make_colour(&FRAMEBUF,
+                                         cyg_fb_palette_vga[i + i + i], cyg_fb_palette_vga[i + i + i + 1],cyg_fb_palette_vga[i + i + i + 2]);
+    }
+
+    cyg_fb_on(&FRAMEBUF);
+    // A white background
+    cyg_fb_fill_block(&FRAMEBUF, 0, 0, FRAMEBUF.fb_width, FRAMEBUF.fb_height, WHITE);
+    // A black block in the middle, 25 pixels in.
+    cyg_fb_fill_block(&FRAMEBUF, 25, 25, FRAMEBUF.fb_width - 50, FRAMEBUF.fb_height - 50, BLACK);
+
+    // Four diagonal lines in the corners. Red in the top left, blue in the top right,
+    // green in the bottom left, and yellow in the bottom right.
+    for (i = 0; i < 25; i++) {
+        cyg_fb_write_pixel(&FRAMEBUF, i,                           i,                            RED);
+        cyg_fb_write_pixel(&FRAMEBUF, (FRAMEBUF.fb_width - 1) - i, i,                            BLUE);
+        cyg_fb_write_pixel(&FRAMEBUF, i,                           (FRAMEBUF.fb_height - 1) - i, GREEN);
+        cyg_fb_write_pixel(&FRAMEBUF, (FRAMEBUF.fb_width - 1) - i, (FRAMEBUF.fb_height - 1) - i, YELLOW);
+    }
+
+    // Horizontal and vertical lines. Cyan at the top, magenta on the bottom,
+    // brown on the left, lightgrey on the right.
+    cyg_fb_write_hline(&FRAMEBUF, 25, 12, FRAMEBUF.fb_width - 50, CYAN);
+    cyg_fb_write_hline(&FRAMEBUF, 25, FRAMEBUF.fb_height - 12, FRAMEBUF.fb_width - 50, MAGENTA);
+    cyg_fb_write_vline(&FRAMEBUF, 12, 25, FRAMEBUF.fb_height - 50, BROWN);
+    cyg_fb_write_vline(&FRAMEBUF, FRAMEBUF.fb_width - 12, 25, FRAMEBUF.fb_height - 50, LIGHTGREY);
+
+    // And 14 vertical stripes, from blue to yellow, in the centre of the box.
+    block_width     = (FRAMEBUF.fb_width - 100) / 14;
+    for (i = 1; i <= 14; i++) {
+        cyg_fb_fill_block(&FRAMEBUF, 50 + ((i - 1) * block_width), 50, block_width, FRAMEBUF.fb_height - 100, colours[i]);
+    }
+
+    cyg_fb_synch(&FRAMEBUF, CYG_FB_UPDATE_NOW);
+#undef FRAMEBUF    
+}
+
+// ----------------------------------------------------------------------------
+// FB1, 320x240 15bpp, true 555, two pages. Draw a set of horizontal lines
+// in one page, vertical lines in the other, and flip between them at
+// one second intervals.
+
+static void
+fb1_thread(cyg_addrword_t arg)
+{
+#define FRAMEBUF cyg_synth_fb1
+    static cyg_ucount32 colours[16];
+    struct cyg_fb_ioctl_page_flip page_flip;
+    size_t len;
+    int result;
+    int i;
+
+    cyg_fb_on(&FRAMEBUF);
+    for (i = 0; i < 16; i++) {
+        colours[i]  = cyg_fb_make_colour(&FRAMEBUF,
+                                         cyg_fb_palette_vga[i + i + i], cyg_fb_palette_vga[i + i + i + 1],cyg_fb_palette_vga[i + i + i + 2]);
+    }
+
+    // Draw the horizontal stripes on page 0.
+    page_flip.fbpf_visible_page     = 0;
+    page_flip.fbpf_drawable_page    = 1;
+    page_flip.fbpf_when             = CYG_FB_UPDATE_NOW;
+    len                             = sizeof(page_flip);
+    result = cyg_fb_ioctl(&FRAMEBUF, CYG_FB_IOCTL_PAGE_FLIPPING_SET_PAGES, &page_flip, &len);
+    if (result != 0) {
+        fprintf(stderr, "fb1_thread: initial page flip failed.\n");
+    }
+    // 16 colours, 240 rows -> 15 rows/colour
+    for (i = 0; i < 16; i++) {
+        cyg_fb_fill_block(&FRAMEBUF, 0, 15 * i, 320, 15, colours[i]);
+    }
+    
+    // Show the horizontal stripes and draw the vertical stripes on page 0.
+    page_flip.fbpf_visible_page     = 1;
+    page_flip.fbpf_drawable_page    = 0;
+    page_flip.fbpf_when             = CYG_FB_UPDATE_NOW;
+    len                             = sizeof(page_flip);
+    result = cyg_fb_ioctl(&FRAMEBUF, CYG_FB_IOCTL_PAGE_FLIPPING_SET_PAGES, &page_flip, &len);
+    if (result != 0) {
+        fprintf(stderr, "fb1_thread: second page flip failed.\n");
+    }
+    // 16 colours, 320 columns -> 20 columns/colour
+    for (i = 0; i < 16; i++) {
+        cyg_fb_fill_block(&FRAMEBUF, 20 * i, 0, 20, 240, colours[i]);
+    }
+    
+    for ( i = 0; ; i = 1 - i) {
+        page_flip.fbpf_visible_page     = i;
+        page_flip.fbpf_drawable_page    = 1 - i;
+        page_flip.fbpf_when             = CYG_FB_UPDATE_NOW;
+        len                             = sizeof(page_flip);
+        result = cyg_fb_ioctl(&FRAMEBUF, CYG_FB_IOCTL_PAGE_FLIPPING_SET_PAGES, &page_flip, &len);
+        if (result != 0) {
+            fprintf(stderr, "fb1_thread: ongoing page flip failed.\n");
+        }
+        cyg_thread_delay(100);
+    }
+#undef FRAMEBUF    
+}
+
+// ----------------------------------------------------------------------------
+// FB2, 320x240 15bpp, true 565, with a 160x120 viewport. Draw a simple image
+// as per the fbmacro.c example. Then move around within the viewport in a
+// clockwise direction at 110ms intervals.
+
+static void
+fb2_thread(cyg_addrword_t arg)
+{
+#define FRAMEBUF fb2
+#define WIDTH    320
+#define HEIGHT   240
+    
+    static cyg_ucount32 colours[16];
+    cyg_ucount16 block_width;
+    int i, j;
+    int x = 0, y = 0;
+    CYG_FB_PIXEL0_VAR(FRAMEBUF);
+    CYG_FB_PIXEL1_VAR(FRAMEBUF);
+    cyg_fb_ioctl_viewport viewport;
+    size_t len;
+
+    CYG_FB_ON(FRAMEBUF);
+    for (i = 0; i < 16; i++) {
+        colours[i]  = CYG_FB_MAKE_COLOUR(FRAMEBUF,
+                                         cyg_fb_palette_vga[i + i + i], cyg_fb_palette_vga[i + i + i + 1],cyg_fb_palette_vga[i + i + i + 2]);
+    }
+    // A white background
+    CYG_FB_FILL_BLOCK(FRAMEBUF, 0, 0, WIDTH, HEIGHT, WHITE);
+    // A black block in the middle, 25 pixels in.
+    CYG_FB_FILL_BLOCK(FRAMEBUF, 32, 32, WIDTH - 64, HEIGHT - 64, BLACK);
+
+    // Four diagonal lines in the corners. Red in the top left, blue in the top right,
+    // green in the bottom left, and yellow in the bottom right.
+    for (i = 0; i < 32; i++) {
+        CYG_FB_WRITE_PIXEL(FRAMEBUF, i,               i,                RED);
+        CYG_FB_WRITE_PIXEL(FRAMEBUF, (WIDTH - 1) - i, i,                BLUE);
+        CYG_FB_WRITE_PIXEL(FRAMEBUF, i,               (HEIGHT - 1) - i, GREEN);
+        CYG_FB_WRITE_PIXEL(FRAMEBUF, (WIDTH - 1) - i, (HEIGHT - 1) - i, YELLOW);
+    }
+
+    // Horizontal and vertical lines. Cyan at the top, magenta on the bottom,
+    // brown on the left, lightgrey on the right.
+    CYG_FB_WRITE_HLINE(FRAMEBUF, 32,         16,            WIDTH - 64, CYAN);
+    CYG_FB_WRITE_HLINE(FRAMEBUF, 32,         HEIGHT - 16,   WIDTH - 64, MAGENTA);
+    CYG_FB_WRITE_VLINE(FRAMEBUF, 16,         32,            HEIGHT - 64, BROWN);
+    CYG_FB_WRITE_VLINE(FRAMEBUF, WIDTH - 16, 32,            HEIGHT - 64, LIGHTGREY);
+
+    // Top left, diagonal lines away from 0,0 with increasing spacing horizontally
+    for (i = 0; i < 16; i++) {
+        CYG_FB_PIXEL0_SET(FRAMEBUF, i + 16, i);
+        for (j = 0; j < 16; j++) {
+            CYG_FB_PIXEL0_WRITE(FRAMEBUF, colours[i]);
+            CYG_FB_PIXEL0_ADDX(FRAMEBUF, j);
+        }
+    }
+
+    // Top right, diagonal lines away from the corner, with increasing spacing horizontally
+    for (i = 0; i < 16; i++) {
+        CYG_FB_PIXEL0_SET(FRAMEBUF, WIDTH - (i + 16), i);
+        for (j = 0; j < 16; j++) {
+            CYG_FB_PIXEL0_WRITE(FRAMEBUF, colours[i]);
+            CYG_FB_PIXEL0_ADDX(FRAMEBUF, -1 * j);
+        }
+    }
+
+    // Top left, diagonal lines away from the corner, with increasing spacing vertically
+    for (i = 0; i < 16; i++) {
+        CYG_FB_PIXEL0_SET(FRAMEBUF, i, i + 16);
+        for (j = 0; j < 16; j++) {
+            CYG_FB_PIXEL0_WRITE(FRAMEBUF, colours[i]);
+            CYG_FB_PIXEL0_ADDY(FRAMEBUF, j);
+        }
+    }
+    // Bottom left, diagonal lines away from the corner, with increasing spacing vertically
+    for (i = 0; i < 16; i++) {
+        CYG_FB_PIXEL0_SET(FRAMEBUF, i, HEIGHT - (i + 16));
+        for (j = 0; j < 16; j++) {
+            CYG_FB_PIXEL0_WRITE(FRAMEBUF, colours[i]);
+            CYG_FB_PIXEL0_ADDY(FRAMEBUF, -1 * j);
+        }
+    }
+
+    // Thin vertical bars in the top-middle of the screen, between the hline and the box.
+    // Starting in the center and moving out with increasing spacing.
+    for (j = 0; j < 8; j++) {
+        CYG_FB_PIXEL0_SET(FRAMEBUF, (WIDTH / 2) - 2, 20 + j);
+        CYG_FB_PIXEL0_GET(FRAMEBUF, x, y);
+        CYG_FB_PIXEL1_SET(FRAMEBUF, x + 3, y);
+        for (i = 0; i < 16; i++) {
+            CYG_FB_PIXEL0_ADDX(FRAMEBUF, -1 * i);
+            CYG_FB_PIXEL1_ADDX(FRAMEBUF, i);
+            CYG_FB_PIXEL0_WRITE(FRAMEBUF, colours[i]);
+            CYG_FB_PIXEL1_WRITE(FRAMEBUF, colours[i]);
+        }
+    }
+    
+    block_width     = (WIDTH - 100) / 14;
+    for (i = 1; i <= 14; i++) {
+        CYG_FB_FILL_BLOCK(FRAMEBUF, 50 + ((i - 1) * block_width), 50, block_width, HEIGHT - 100, colours[i]);
+    }
+    
+    
+    for ( ; ; ) {
+        for (x = 0; x <= 160; x += 5) {
+            viewport.fbvp_x     = x;
+            viewport.fbvp_y     = 0;
+            viewport.fbvp_when  = CYG_FB_UPDATE_NOW;
+            len                 = sizeof(viewport);
+            CYG_FB_IOCTL(FRAMEBUF, CYG_FB_IOCTL_VIEWPORT_SET_POSITION, &viewport, &len);
+            cyg_thread_delay(11);
+        }
+        for (y = 0; y < 120; y += 5) {
+            viewport.fbvp_x     = 160;
+            viewport.fbvp_y     = y;
+            viewport.fbvp_when  = CYG_FB_UPDATE_NOW;
+            len                 = sizeof(viewport);
+            CYG_FB_IOCTL(FRAMEBUF, CYG_FB_IOCTL_VIEWPORT_SET_POSITION, &viewport, &len);
+            cyg_thread_delay(11);
+        }
+        for (x = 160; x >= 0; x -= 5) {
+            viewport.fbvp_x     = x;
+            viewport.fbvp_y     = 120;
+            viewport.fbvp_when  = CYG_FB_UPDATE_NOW;
+            len                 = sizeof(viewport);
+            CYG_FB_IOCTL(FRAMEBUF, CYG_FB_IOCTL_VIEWPORT_SET_POSITION, &viewport, &len);
+            cyg_thread_delay(11);
+        }
+        for (y = 120; y >= 0; y -= 5) {
+            viewport.fbvp_x     = 0;
+            viewport.fbvp_y     = y;
+            viewport.fbvp_when  = CYG_FB_UPDATE_NOW;
+            len                 = sizeof(viewport);
+            CYG_FB_IOCTL(FRAMEBUF, CYG_FB_IOCTL_VIEWPORT_SET_POSITION, &viewport, &len);
+            cyg_thread_delay(11);
+        }
+    }
+#undef FRAMEBUF
+#undef WIDTH
+#undef HEIGHT
+}
+
+// ----------------------------------------------------------------------------
+// FB3, 320x240 8bpp, paletted 888. Draw a series of vertical stripes, 5 pixels
+// wide, and rotate through the palette at 210ms intervals.
+
+static void
+fb3_thread(cyg_addrword_t arg)
+{
+#define FRAMEBUF    fb3
+    static cyg_uint8 palette[(128 +16) * 3];
+    int i;
+
+    CYG_FB_ON(FRAMEBUF);
+
+    // Read in the first 128 palette entries, and copy the first 16
+    // entries to give a wrap-around. After 128 the palette gets less
+    // interesting.
+    CYG_FB_READ_PALETTE(FRAMEBUF, 0, 128, palette);
+    memcpy(&(palette[128 * 3]), palette, 16 * 3);
+    
+    for (i = 0; i < 32; i++) {
+        CYG_FB_FILL_BLOCK(FRAMEBUF, 10 * i, 0, 10, 240, i);
+    }
+    
+    for ( i = 0; ; i = (i + 1) % 128 ) {
+        cyg_thread_delay(21);
+        CYG_FB_WRITE_PALETTE(FRAMEBUF, 0, 64, &(palette[i * 3]), CYG_FB_UPDATE_NOW);
+    }
+#undef FRAMEBUF    
+}
+
+// ----------------------------------------------------------------------------
+// main(). Start up separate threads for FB1 and FB2, run the FB0 code since
+// it just does some drawing and finishes, then run the FB3 code.
+static cyg_thread       fb1_thread_data;
+static cyg_handle_t     fb1_thread_handle;
+static unsigned char    fb1_thread_stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+static cyg_thread       fb2_thread_data;
+static cyg_handle_t     fb2_thread_handle;
+static unsigned char    fb2_thread_stack[CYGNUM_HAL_STACK_SIZE_TYPICAL];
+
+int
+main(int argc, char** argv)
+{
+    cyg_thread_create(10, &fb1_thread, 0, "fb1", fb1_thread_stack, CYGNUM_HAL_STACK_SIZE_TYPICAL, &fb1_thread_handle, &fb1_thread_data);
+    cyg_thread_create(10, &fb2_thread, 0, "fb2", fb2_thread_stack, CYGNUM_HAL_STACK_SIZE_TYPICAL, &fb2_thread_handle, &fb2_thread_data);
+    cyg_thread_resume(fb1_thread_handle);
+    cyg_thread_resume(fb2_thread_handle);
+    fb0_thread(0);
+    fb3_thread(0);
+    return 0;
+}
+
new file mode 100644
--- /dev/null
+++ b/packages/devs/framebuf/synth/current/misc/example.ecm
@@ -0,0 +1,85 @@
+cdl_configuration eCos {
+    package CYGPKG_IO_FRAMEBUF ;
+};
+
+cdl_component CYGPKG_DEVS_FRAMEBUF_SYNTH_FB0 {
+    user_value 1
+};
+
+cdl_option CYGNUM_DEVS_FRAMEBUF_SYNTH_FB0_WIDTH {
+    user_value 320
+};
+
+cdl_option CYGNUM_DEVS_FRAMEBUF_SYNTH_FB0_HEIGHT {
+    user_value 240
+};
+
+cdl_option CYGDAT_DEVS_FRAMEBUF_SYNTH_FB0_FORMAT {
+    user_value 32BPP_TRUE_0888
+};
+
+cdl_component CYGPKG_DEVS_FRAMEBUF_SYNTH_FB1 {
+    user_value 1
+};
+
+cdl_option CYGNUM_DEVS_FRAMEBUF_SYNTH_FB1_WIDTH {
+    user_value 320
+};
+
+cdl_option CYGNUM_DEVS_FRAMEBUF_SYNTH_FB1_HEIGHT {
+    user_value 240
+};
+
+cdl_option CYGDAT_DEVS_FRAMEBUF_SYNTH_FB1_FORMAT {
+    user_value 16BPP_TRUE_555
+};
+
+cdl_option CYGNUM_DEVS_FRAMEBUF_SYNTH_FB1_PAGE_FLIPPING {
+    user_value 1 2
+};
+
+cdl_component CYGPKG_DEVS_FRAMEBUF_SYNTH_FB2 {
+    user_value 1
+};
+
+cdl_option CYGNUM_DEVS_FRAMEBUF_SYNTH_FB2_WIDTH {
+    user_value 320
+};
+
+cdl_option CYGNUM_DEVS_FRAMEBUF_SYNTH_FB2_HEIGHT {
+    user_value 240
+};
+
+cdl_option CYGDAT_DEVS_FRAMEBUF_SYNTH_FB2_FORMAT {
+    user_value 16BPP_TRUE_565
+};
+
+cdl_component CYGIMP_DEVS_FRAMEBUF_SYNTH_FB2_VIEWPORT {
+    user_value 1
+};
+
+cdl_option CYGNUM_DEVS_FRAMEBUF_SYNTH_FB2_VIEWPORT_WIDTH {
+    user_value 160
+};
+
+cdl_option CYGNUM_DEVS_FRAMEBUF_SYNTH_FB2_VIEWPORT_HEIGHT {
+    user_value 120
+};
+
+cdl_component CYGPKG_DEVS_FRAMEBUF_SYNTH_FB3 {
+    user_value 1
+};
+
+cdl_option CYGNUM_DEVS_FRAMEBUF_SYNTH_FB3_WIDTH {
+    user_value 320
+};
+
+cdl_option CYGNUM_DEVS_FRAMEBUF_SYNTH_FB3_HEIGHT {
+    user_value 240
+};
+
+cdl_option CYGDAT_DEVS_FRAMEBUF_SYNTH_FB3_FORMAT {
+    user_value 8BPP_PAL888
+};
+
+
new file mode 100644
--- /dev/null
+++ b/packages/devs/framebuf/synth/current/misc/example.tdf
@@ -0,0 +1,42 @@
+# An example framebuffer create function. This is for use with the
+# synthetic target framebuffer example program which uses four
+# devices:
+#
+#  fb0: 320x240 32bpp true 0888
+#  fb1: 320x240 16bpp true 555 with two pages
+#  fb2: 320x240 16bpp true 565 with a viewport of 160x120
+#  fb3: 320x240 8bpp  pal  888
+#
+# These are all created in a single toplevel .synth_framebufs, one above the other,
+# with labels in between.
+proc my_framebuf_create_frame { fb_id magnification depth little_endian width height viewport_width viewport_height stride number_pages format } {
+    if { ![winfo exists .synth_framebufs] } {
+        toplevel    .synth_framebufs
+        wm title    .synth_framebufs "Synthetic target framebuffers"
+        wm protocol .synth_framebufs WM_DELETE_WINDOW {}
+        wm geometry .synth_framebufs +1000+0
+
+        label .synth_framebufs.fb0_label -text "FB0 320x240 32bpp true 0888"
+        frame .synth_framebufs.fb0 -container 1 -height 240 -width 320
+        label .synth_framebufs.fb1_label -text "FB1 320x240 16bpp true 0555 two pages"
+        frame .synth_framebufs.fb1 -container 1 -height 240 -width 320
+        label .synth_framebufs.fb2_label -text "FB2 320x240 16bpp true 0565\nviewport 160x120 magnified *2"
+        frame .synth_framebufs.fb2 -container 1 -height 240 -width 320
+        label .synth_framebufs.fb3_label -text "FB3 320x240  8bpp paletted 888"
+        frame .synth_framebufs.fb3 -container 1 -height 240 -width 320
+        pack .synth_framebufs.fb0_label -side top -expand 1 -anchor w -fill x
+        pack .synth_framebufs.fb0       -side top -expand 0 -anchor w
+        pack .synth_framebufs.fb1_label -side top -expand 1 -anchor w -fill x
+        pack .synth_framebufs.fb1       -side top -expand 0 -anchor w
+        pack .synth_framebufs.fb2_label -side top -expand 1 -anchor w -fill x
+        pack .synth_framebufs.fb2       -side top -expand 0 -anchor w
+        pack .synth_framebufs.fb3_label -side top -expand 1 -anchor w -fill x
+        pack .synth_framebufs.fb3       -side top -expand 0 -anchor w
+    }
+    return .synth_framebufs.fb$fb_id
+}
+
+synth_device framebuf {
+    fb2_magnification   2
+    create_frame_proc   my_framebuf_create_frame
+}
new file mode 100644
--- /dev/null
+++ b/packages/devs/framebuf/synth/current/src/gen_synthfb.tcl
@@ -0,0 +1,352 @@
+#!/bin/bash
+# restart using a Tcl shell \
+    exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \
+    ( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \
+    done ; \
+    echo "gen_synthfb.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@"
+
+#===============================================================================
+#
+#    gen_synthfb.tcl
+#
+#    Generate header files for all enabled synthetic target framebuffer devices.
+#
+#===============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+# -------------------------------------------
+# This file is part of eCos, the Embedded Configurable Operating System.
+# Copyright (C) 2008 Free Software Foundation, Inc.
+#
+# eCos 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.
+#
+# eCos 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 eCos; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+#
+# As a special exception, if other files instantiate templates or use macros
+# or inline functions from this file, or you compile this file and link it
+# with other works to produce a work based on this file, this file does not
+# by itself cause the resulting work to be covered by the GNU General Public
+# License. However the source code for this file must still be made available
+# in accordance with section (3) of the GNU General Public License.
+#
+# This exception does not invalidate any other reasons why a work based on
+# this file might be covered by the GNU General Public License.
+# -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+#===============================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s):	bartv
+# Date:		2005-10-28
+#
+# This script is invoked via a custom make rule to generate files
+# <cyg/io/framebufs/synth_fb.h> and synth_fbs.c
+#
+#####DESCRIPTIONEND####
+#===============================================================================
+
+proc do_it { prefix } {
+    set pkgconf_file	[file join $prefix "include/pkgconf/devs_framebuf_synth.h"]
+    if { ! [file exists $pkgconf_file] } {
+        puts stderr "gen_synthfb.tcl: missing configuration header $pkgconf_file"
+        exit 1
+    }
+    set fd [open $pkgconf_file "r"]
+    set data [read $fd]
+    close $fd
+    
+    array set defines	[list]
+    foreach line [split $data "\n"] {
+        if { [regexp -- {^\#define[[:space:]]*([a-zA-Z_][a-zA-Z0-9_]*)[[:space:]]+([^[:space:]]+)$} $line junk symbol value] } {
+            set defines($symbol) $value
+        }
+    }
+
+    set data \
+        "/*
+ * File <cyg/io/framebufs/synth_fb.h>
+ *
+ * This is a generated file - do not edit!
+ * It should not be \#include'd directly. Instead use <cyg/io/framebuf.h>
+ */
+
+#include <cyg/io/framebuf.inl>
+
+"
+    
+    for { set fb 0 } { $fb < 4 } { incr fb } {
+        if { ! [info exists defines(CYGPKG_DEVS_FRAMEBUF_SYNTH_FB[set fb])] } {
+            continue
+        }
+        
+        set width	$defines(CYGNUM_DEVS_FRAMEBUF_SYNTH_FB[set fb]_WIDTH)
+        set height	$defines(CYGNUM_DEVS_FRAMEBUF_SYNTH_FB[set fb]_HEIGHT)
+        set flags0  "(CYG_FB_FLAGS0_LINEAR_FRAMEBUFFER | \\\n    CYG_FB_FLAGS0_DOUBLE_BUFFER | \\\n"
+        if { [info exists defines(CYGIMP_DEVS_FRAMEBUF_SYNTH_FB[set fb]_VIEWPORT) ] } {
+            set viewport_width	$defines(CYGNUM_DEVS_FRAMEBUF_SYNTH_FB[set fb]_VIEWPORT_WIDTH)
+            set viewport_height	$defines(CYGNUM_DEVS_FRAMEBUF_SYNTH_FB[set fb]_VIEWPORT_HEIGHT)
+            append flags0 "    CYG_FB_FLAGS0_VIEWPORT | \\\n"
+        } else {
+            set viewport_width  $width
+            set viewport_height $height
+        }
+        if { [info exists defines(CYGNUM_DEVS_FRAMEBUF_SYNTH_FB[set fb]_PAGE_FLIPPING)] } {
+            append flags0 "    CYG_FB_FLAGS0_PAGE_FLIPPING | \\\n"
+        }
+        set paletted		1
+        switch -- $defines(CYGDAT_DEVS_FRAMEBUF_SYNTH_FB[set fb]_FORMAT) {
+            1BPP_BE_PAL888 {
+                set format	    "CYG_FB_FORMAT_1BPP_PAL888"
+                set suffix	    "1BE"
+                set depth	    1
+                set stride	    [expr ($width + 7) >> 3]
+            }
+            1BPP_LE_PAL888 {
+                append flags0	"    CYG_FB_FLAGS0_LE | \\\n"
+                set format	    "CYG_FB_FORMAT_1BPP_PAL888"
+                set suffix	    "1LE"
+                set depth	    1
+                set stride	    [expr ($width + 7) >> 3]
+            }
+            2BPP_BE_PAL888 {
+                set format	    "CYG_FB_FORMAT_2BPP_PAL888"
+                set suffix	    "2BE"
+                set depth   	2
+                set stride	    [expr ($width + 3) >> 2]
+            }
+            2BPP_LE_PAL888 {
+                append flags0	"    CYG_FB_FLAGS0_LE | \\\n"
+                set format	    "CYG_FB_FORMAT_2BPP_PAL888"
+                set suffix	    "2LE"
+                set depth	    2
+                set stride	    [expr ($width + 3) >> 2]
+            }
+            4BPP_BE_PAL888 {
+                set format	    "CYG_FB_FORMAT_4BPP_PAL888"
+                set suffix	    "4BE"
+                set depth	    4
+                set stride	    [expr ($width + 1) >> 1]
+            }
+            4BPP_LE_PAL888 {
+                append flags0	"    CYG_FB_FLAGS0_LE | \\\n"
+                set format	    "CYG_FB_FORMAT_4BPP_PAL888"
+                set suffix	    "4LE"
+                set depth	    4
+                set stride	    [expr ($width + 1) >> 1]
+            }
+            8BPP_PAL888 {
+                set format	    "CYG_FB_FORMAT_8BPP_PAL888"
+                set suffix	    "8"
+                set depth	    8
+                set stride	    $width
+            }
+            8BPP_TRUE_332 {
+                set format		        "CYG_FB_FORMAT_8BPP_TRUE_332"
+                set suffix		        "8"
+                set paletted		    0
+                set make_colour_fn	    "cyg_fb_dev_make_colour_8bpp_true_332"
+                set break_colour_fn	    "cyg_fb_dev_break_colour_8bpp_true_332"
+                set make_colour_macro	"CYG_FB_MAKE_COLOUR_8BPP_TRUE_332"
+                set break_colour_macro	"CYG_FB_BREAK_COLOUR_8BPP_TRUE_332"
+                set depth		        8
+                set stride		        $width
+            }
+            16BPP_TRUE_565 {
+                set format		        "CYG_FB_FORMAT_16BPP_TRUE_565"
+                set suffix		        "16"
+                set paletted		    0
+                set make_colour_fn	    "cyg_fb_dev_make_colour_16bpp_true_565"
+                set break_colour_fn	    "cyg_fb_dev_break_colour_16bpp_true_565"
+                set make_colour_macro   "CYG_FB_MAKE_COLOUR_16BPP_TRUE_565"
+                set break_colour_macro  "CYG_FB_BREAK_COLOUR_16BPP_TRUE_565"
+                set depth		        16
+                set stride		        [expr $width * 2]
+            }
+            16BPP_TRUE_555 {
+                set format		        "CYG_FB_FORMAT_16BPP_TRUE_555"
+                set suffix		        "16"
+                set paletted		    0
+                set make_colour_fn	    "cyg_fb_dev_make_colour_16bpp_true_555"
+                set break_colour_fn	    "cyg_fb_dev_break_colour_16bpp_true_555"
+                set make_colour_macro   "CYG_FB_MAKE_COLOUR_16BPP_TRUE_555"
+                set break_colour_macro	"CYG_FB_BREAK_COLOUR_16BPP_TRUE_555"
+                set depth		        16
+                set stride		        [expr $width * 2]
+            }
+            32BPP_TRUE_0888 {
+                set format		        "CYG_FB_FORMAT_32BPP_TRUE_0888"
+                set suffix		        "32"
+                set paletted		    0
+                set make_colour_fn	    "cyg_fb_dev_make_colour_32bpp_true_0888"
+                set break_colour_fn	    "cyg_fb_dev_break_colour_32bpp_true_0888"
+                set make_colour_macro	"CYG_FB_MAKE_COLOUR_32BPP_TRUE_0888"
+                set break_colour_macro  "CYG_FB_BREAK_COLOUR_32BPP_TRUE_0888"
+                set depth		        32
+                set stride		        [expr $width * 4]
+            }
+        }
+        if { $paletted } {
+            append flags0		"    CYG_FB_FLAGS0_PALETTE | \\\n    CYG_FB_FLAGS0_WRITEABLE_PALETTE | \\\n"
+            set write_palette_fn	"cyg_synth_fb_write_palette"
+            set read_palette_fn		"cyg_synth_fb_read_palette"
+            set make_colour_fn		"cyg_fb_nop_make_colour"
+            set break_colour_fn		"cyg_fb_nop_break_colour"
+        } else {
+            append flags0 		"    CYG_FB_FLAGS0_TRUE_COLOUR | \\\n"
+            set write_palette_fn	"cyg_fb_nop_write_palette"
+            set read_palette_fn		"cyg_fb_nop_read_palette"
+        }
+        append flags0		"    CYG_FB_FLAGS0_BLANK)"
+
+        # The framebuffer parameters
+        append data \
+            "
+extern cyg_fb cyg_synth_fb[set fb];
+extern cyg_uint8* cyg_synth_fb[set fb]_base;
+#define CYG_FB_fb[set fb]_STRUCT            cyg_synth_fb[set fb]
+#define CYG_FB_fb[set fb]_DEPTH             $depth
+#define CYG_FB_fb[set fb]_FORMAT            $format
+#define CYG_FB_fb[set fb]_WIDTH             $width
+#define CYG_FB_fb[set fb]_HEIGHT            $height
+#define CYG_FB_fb[set fb]_VIEWPORT_WIDTH    $viewport_width
+#define CYG_FB_fb[set fb]_VIEWPORT_HEIGHT   $viewport_height
+#define CYG_FB_fb[set fb]_BASE              cyg_synth_fb[set fb]_base
+#define CYG_FB_fb[set fb]_STRIDE            $stride
+#define CYG_FB_fb[set fb]_FLAGS0            $flags0
+#define CYG_FB_fb[set fb]_FLAGS1            0
+#define CYG_FB_fb[set fb]_FLAGS2            0
+#define CYG_FB_fb[set fb]_FLAGS3            0
+"
+
+        # These macros are not part of the usual framebuffer set, but are
+        # useful because of the configurable nature of the synthetic target
+        append data \
+            "
+#define CYG_FB_fb[set fb]_SUFFIX            $suffix
+#define CYG_FB_fb[set fb]_READ_PALETTE_FN   $read_palette_fn
+#define CYG_FB_fb[set fb]_WRITE_PALETTE_FN  $write_palette_fn
+#define CYG_FB_fb[set fb]_MAKE_COLOUR_FN    $make_colour_fn
+#define CYG_FB_fb[set fb]_BREAK_COLOUR_FN   $break_colour_fn
+"
+        # And the macro API, all done in terms of the linear framebuffer functions.
+        append data \
+            "
+#define CYG_FB_fb[set fb]_PIXELx_VAR(  _fb_, _id_)    CYG_FB_PIXELx_VAR_[set suffix](  _fb_, _id_)
+#define CYG_FB_fb[set fb]_PIXELx_SET(  _fb_, _id_, _x_, _y_) \\
+    CYG_MACRO_START \\
+    CYG_FB_PIXELx_SET_[set suffix](  _fb_, _id_, CYG_FB_fb[set fb]_BASE, CYG_FB_fb[set fb]_STRIDE, _x_, _y_); \\
+    CYG_MACRO_END
+#define CYG_FB_fb[set fb]_PIXELx_GET(  _fb_, _id_, _x_, _y_) \\
+    CYG_MACRO_START \\
+    CYG_FB_PIXELx_GET_[set suffix](  _fb_, _id_, CYG_FB_fb[set fb]_BASE, CYG_FB_fb[set fb]_STRIDE, _x_, _y_); \\
+    CYG_MACRO_END 
+#define CYG_FB_fb[set fb]_PIXELx_ADDX( _fb_, _id_, _incr_) \\
+    CYG_MACRO_START \\
+    CYG_FB_PIXELx_ADDX_[set suffix]( _fb_, _id_, CYG_FB_fb[set fb]_STRIDE, _incr_); \\
+    CYG_MACRO_END 
+#define CYG_FB_fb[set fb]_PIXELx_ADDY( _fb_, _id_, _incr_) \\
+    CYG_MACRO_START \\
+    CYG_FB_PIXELx_ADDY_[set suffix]( _fb_, _id_, CYG_FB_fb[set fb]_STRIDE, _incr_); \\
+    CYG_MACRO_END 
+#define CYG_FB_fb[set fb]_PIXELx_WRITE(_fb_, _id_, _colour_) \\
+    CYG_MACRO_START \\
+    CYG_FB_PIXELx_WRITE_[set suffix](_fb_, _id_, _colour_); \\
+    CYG_MACRO_END 
+#define CYG_FB_fb[set fb]_PIXELx_READ( _fb_, _id_) \\
+    ({ CYG_FB_PIXELx_READ_[set suffix]( _fb_, _id_); }) 
+#define CYG_FB_fb[set fb]_PIXELx_FLUSHABS( _fb_, _id_, _x0_, _y0_, _width_, _height_) \\
+    CYG_MACRO_START \\
+    CYG_FB_PIXELx_FLUSHABS_[set suffix](_fb_, _id_, _x0_, _y0_, _width_, _height_); \\
+    CYG_MACRO_END 
+#define CYG_FB_fb[set fb]_PIXELx_FLUSHREL( _fb_, _id_, _x0_, _y0_, _dx_, _dy_) \\
+    CYG_MACRO_START \\
+    CYG_FB_PIXELx_FLUSHREL_[set suffix](_fb_, _id_, _x0_, _y0_, _dx_, _dy_); \\
+    CYG_MACRO_END 
+
+#define CYG_FB_fb[set fb]_WRITE_PIXEL(_x_, _y_, _colour_) \\
+    CYG_MACRO_START \\
+    cyg_fb_linear_write_pixel_[set suffix]_inl(CYG_FB_fb[set fb]_BASE, CYG_FB_fb[set fb]_STRIDE, \\
+                                    _x_, _y_, _colour_); \\
+    CYG_MACRO_END 
+#define CYG_FB_fb[set fb]_READ_PIXEL(_x_, _y_) \\
+    ({ cyg_fb_linear_read_pixel_[set suffix]_inl(CYG_FB_fb[set fb]_BASE, CYG_FB_fb[set fb]_STRIDE, _x_, _y_); }) 
+#define CYG_FB_fb[set fb]_WRITE_HLINE(_x_, _y_, _len_, _colour_) \\
+    CYG_MACRO_START \\
+    cyg_fb_linear_write_hline_[set suffix]_inl(CYG_FB_fb[set fb]_BASE, CYG_FB_fb[set fb]_STRIDE, \\
+                                    _x_, _y_, _len_, _colour_); \\
+    CYG_MACRO_END 
+#define CYG_FB_fb[set fb]_WRITE_VLINE(_x_, _y_, _len_, _colour_) \\
+    CYG_MACRO_START \\
+    cyg_fb_linear_write_vline_[set suffix]_inl(CYG_FB_fb[set fb]_BASE, CYG_FB_fb[set fb]_STRIDE, \\
+                                    _x_, _y_, _len_, _colour_); \\
+    CYG_MACRO_END 
+#define CYG_FB_fb[set fb]_FILL_BLOCK(_x_, _y_, _width_, _height_, _colour_) \\
+    CYG_MACRO_START \\
+    cyg_fb_linear_fill_block_[set suffix]_inl(CYG_FB_fb[set fb]_BASE, CYG_FB_fb[set fb]_STRIDE, \\
+                                   _x_, _y_, _width_, _height_, _colour_); \\
+    CYG_MACRO_END 
+#define CYG_FB_fb[set fb]_WRITE_BLOCK(_x_, _y_, _width_, _height_, _data_, _offset_, _data_stride_) \\
+    CYG_MACRO_START \\
+    cyg_fb_linear_write_block_[set suffix]_inl(CYG_FB_fb[set fb]_BASE, CYG_FB_fb[set fb]_STRIDE, \\
+                                    _x_, _y_, _width_, _height_, _data_, _offset_, _data_stride_); \\
+    CYG_MACRO_END 
+#define CYG_FB_fb[set fb]_READ_BLOCK(_x_, _y_, _width_, _height_, _data_, _offset_, _data_stride_) \\
+    CYG_MACRO_START \\
+    cyg_fb_linear_read_block_[set suffix]_inl(CYG_FB_fb[set fb]_BASE, CYG_FB_fb[set fb]_STRIDE, \\
+                                   _x_, _y_, _width_, _height_, _data_, _offset_, _data_stride_); \\
+    CYG_MACRO_END 
+#define CYG_FB_fb[set fb]_MOVE_BLOCK(_x_, _y_, _width_, _height_, _new_x_, _new_y_) \\
+    CYG_MACRO_START \\
+    cyg_fb_linear_move_block_[set suffix]_inl(CYG_FB_fb[set fb]_BASE, CYG_FB_fb[set fb]_STRIDE, \\
+                                   _x_, _y_, _width_, _height_, _new_x_, _new_y_); \\
+    CYG_MACRO_END
+"
+        if { !$paletted } {
+            append data \
+                "
+#define CYG_FB_fb[set fb]_MAKE_COLOUR(_r_, _g_, _b_)                \\
+    ({ [set make_colour_macro](_r_, _g_, _b_); })
+#define CYG_FB_fb[set fb]_BREAK_COLOUR(_colour_, _r_, _g_, _b_)     \\
+    CYG_MACRO_START                                                 \\
+    [set break_colour_macro](_colour_, _r_, _g_, _b_);              \\
+    CYG_MACRO_END
+"
+        }
+    }
+
+    set old_data ""
+    set framebuf_file [file join $prefix "include/cyg/io/framebufs/synth_fb.h"]
+    if { [file exists $framebuf_file] && [file readable $framebuf_file] } {
+        set fd [open $framebuf_file "r"]
+        set old_data [read $fd]
+        close $fd
+    }
+    if { ! [string equal $old_data $data] } {
+        if { ! [info exists [file dirname $framebuf_file]] } {
+            file mkdir [file dirname $framebuf_file]
+        }
+        set fd [open $framebuf_file "w"]
+        puts -nonewline $fd $data
+        close $fd
+    }
+}
+
+if { 0 == $::argc } {
+    puts stderr "gen_synthfb.tcl: missing argument for install directory"
+    exit 1
+}
+if { [catch { do_it [lindex $::argv 0] } msg] } {
+    puts stderr "gen_synthfb.tcl: internal error"
+    puts stderr "    $msg"
+    exit 1
+}
+exit 0
+
new file mode 100644
--- /dev/null
+++ b/packages/devs/framebuf/synth/current/src/protocol.h
@@ -0,0 +1,123 @@
+//==========================================================================
+//
+//      protocol.h
+//
+//      Data common to host and target.
+//
+//==========================================================================
+//###ECOSGPLCOPYRIGHTBEGIN####
+//-------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2008 Free Software Foundation, Inc.
+// eCos 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.
+//
+// eCos 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 eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//###DESCRIPTIONBEGIN####
+//
+// Author(s):     bartv
+// Date:          2005-10-28
+//
+//###DESCRIPTIONEND####
+//========================================================================
+
+// These requests are sent by eCos to the I/O auxiliary and the
+// framebuf.tcl script.
+//
+// Protocol version number
+#define SYNTH_FB_PROTOCOL_VERSION   0x01
+
+// Initialize, getting back various file names.
+#define SYNTH_FB_INIT               0x01
+// Abort, failed to open the file names
+#define SYNTH_FB_ABORT              0x02
+// Switch a device back on.
+#define SYNTH_FB_ON                 0x03
+// Or off
+#define SYNTH_FB_OFF                0x04
+
+// These requests are sent by eCos to the host-side framebuf program
+// to indicate what has changed.
+//
+// All connected
+#define SYNTH_FB_OK                 0x01
+// A double buffer synch.
+#define SYNTH_FB_SYNC               0x02
+// Palette change, redraw the lot
+#define SYNTH_FB_WRITE_PALETTE      0x03
+// Blank or unblank the screen
+#define SYNTH_FB_BLANK              0x04
+// Move the viewport
+#define SYNTH_FB_VIEWPORT           0x05
+// Page flipping
+#define SYNTH_FB_PAGE_FLIP          0x06
+
+// These requests go from the framebuf.tcl script to the framebuf
+// program.
+typedef struct synth_fb_auxiliary_request {
+    unsigned int command;
+    unsigned int arg1;
+    unsigned int arg2;
+} synth_fb_auxiliary_request;
+
+// This is sent when the frame becomes visible. It is followed
+// by a 32-bit windows id.
+#define SYNTH_FB_AUX_MAPPED         0x01
+// ON, processed by auxiliary and then passed on to framebuf
+#define SYNTH_FB_AUX_ON             0x02
+// OFF, processed by auxiliary and then passed on to framebuf
+#define SYNTH_FB_AUX_OFF            0x03
+// Refresh, sent by the auxiliary a second after mapping.
+#define SYNTH_FB_AUX_REDRAW         0x04
+
+// This data structure is in the shared memory region.
+typedef struct synth_fb_data {
+    // Do we have a connection to a host-side framebuf program to do
+    // the drawing?
+    int             connected;
+    // Named fifo between framebuf and the synthetic target.
+    int             fifo_to_framebuf;
+    int             fifo_from_framebuf;
+    // The device id for the auxiliary
+    int             devid;
+    // The bounding box for syncs.
+    int             sync_x0;
+    int             sync_y0;
+    int             sync_x1;
+    int             sync_y1;
+    // Is the display on?
+    int             display_on;
+    // Current blank state
+    int             blank_on;
+    // Current viewport position, top left
+    int             viewport_x;
+    int             viewport_y;
+    // Current page for page flipping
+    int             page_visible;
+    int             page_drawable;
+    // The palette, if used.
+    unsigned char   palette[3 * 256];
+    // The framebuffer data follows.
+    unsigned int    framebuf[1];
+} synth_fb_data;
new file mode 100644
--- /dev/null
+++ b/packages/devs/framebuf/synth/current/src/synthfb.c
@@ -0,0 +1,679 @@
+//==========================================================================
+//
+//      synthfb.c
+//
+//      Provide one or more framebuffer devices for the synthetic target.
+//
+//==========================================================================
+//###ECOSGPLCOPYRIGHTBEGIN####
+//-------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2008 Free Software Foundation, Inc.
+// eCos 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.
+//
+// eCos 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 eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//###DESCRIPTIONBEGIN####
+//
+// Author(s):     bartv
+// Date:          2005-10-28
+//
+//###DESCRIPTIONEND####
+//========================================================================
+
+#include <pkgconf/devs_framebuf_synth.h>
+#include <pkgconf/io_framebuf.h>
+#include <cyg/io/framebuf.h>
+#include <errno.h>
+#include <string.h>
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/infra/diag.h>
+#include <cyg/hal/hal_io.h>
+#include "protocol.h"
+
+// Set the DEBUG_LEVEL to 0 for no debugging, 2 for maximum debugging.
+#define DEBUG_LEVEL 0
+#define DEBUG(_level_, _str_, ...)              \
+    CYG_MACRO_START                             \
+    if (_level_ <= DEBUG_LEVEL) {               \
+        diag_printf( _str_, ## __VA_ARGS__);    \
+    }                                           \
+    CYG_MACRO_END
+
+// Achieving high performance graphics operations in the synthetic
+// target is difficult. Theoretically it might be possible to access
+// the Linux framebuffer directly using MIT-SHM or DGA. However there
+// is no practical way to handle the relevant parts of the X prococol,
+// e.g. expose events. We also don't want to go via the
+// general-purpose xchgmsg() functionality and a Tcl script, those
+// are not appropriate for high performance.
+//
+// Instead if the I/O auxiliary is running a framebuffer device is
+// instantiated, and the framebuf.tcl script will start a program
+// framebuf. That program will create a shared memory region which
+// then gets mapped into the synthetic target's address space. The
+// shared memory region holds a synth_fb_data structure followed by
+// the framebuffer data. If there are multiple framebuffer devices
+// then there will be multiple invocations of the framebuf program.
+//
+// The framebuf program needs to respond to requests from several
+// different sources. The X server may send events like expose.
+// The synthetic target application can send synchronization requests,
+// palette updates, and so on. The X events will come via a socket,
+// and the requests from framebuf.tcl can come via a pipe. select()
+// will serve for this. Several mechanisms can be used for the
+// communication between the synthetic target application and framebuf
+// including shared memory semaphores and reliable signals. To fit in
+// neatly with the select() a named fifo is used.
+//
+// So assuming a framebuf program is running fb_op() writes a single
+// byte to the fifo, then waits for framebuf to complete the
+// operation. That wait also uses a named fifo. This keeps everything
+// synchronous, and avoids some portability problems between
+// Linux on various architectures.
+static void
+fb_op(cyg_fb* fb, int command)
+{
+    synth_fb_data*  fb_data = (synth_fb_data*) fb->fb_driver2;
+    DEBUG(2, "target synthfb: fb_op %d\n", command);
+    if (fb_data->connected) {
+        cyg_uint8   data[1];
+        int         rc;
+        
+        data[0] = (cyg_uint8)command;
+        do {
+            rc = cyg_hal_sys_write(fb_data->fifo_to_framebuf, (const void*) data, 1);
+        } while (-CYG_HAL_SYS_EINTR == rc);
+        do {
+            rc = cyg_hal_sys_read(fb_data->fifo_from_framebuf, (void*) data, 1);
+        } while (-CYG_HAL_SYS_EINTR == rc);
+        if (rc < 0) {
+            diag_printf("Internal error: unexpected result %d when receiving response from the framebuf program.\n", rc);
+            diag_printf("              : disabling framebuffer device fb%d.\n", fb->fb_driver0);
+            fb_data->connected = 0;
+        }
+    }
+    DEBUG(2, "target synthfb: fb_op %d done\n", command);
+}
+
+// Create a framebuffer device. This gets called from a C++
+// static constructor, to ensure that all the framebuffer
+// windows are created early on during initialization before
+// the host-side ecosynth support performs any cleanups.
+void
+_cyg_synth_fb_instantiate(struct cyg_fb* fb)
+{
+    synth_fb_data*  local_fb_data = (synth_fb_data*) fb->fb_driver2;
+    synth_fb_data*  shared_fb_data;
+    char            device_data[512];
+    char            fb_name[4];
+    char*           fb_format   = 0;
+    char*           ptr;
+    char*           filename;
+    int             fd;
+    int             len;
+    int             reply;
+    cyg_uint8*      fb_base;
+    DEBUG(1, "target synth_fb_instantiate\n");
+
+    if (!synth_auxiliary_running) {
+        diag_printf("cyg_synth_fb_instantiate(): no I/O auxiliary, sticking with in-memory framebuffer\n");
+        return;
+    }
+
+    diag_sprintf(fb_name, "fb%d", fb->fb_driver0);
+    switch(fb->fb_format) {
+        // Only bother with the formats used by gensynth_fb.tcl
+      case CYG_FB_FORMAT_1BPP_PAL888:
+        {
+            static const cyg_uint8  fb_1bpp_palette[2 * 3]  = {
+                0x00, 0x00, 0x00,   // colour 0 == black
+                0xFF, 0xFF, 0xFF    // colour 1 == white
+            };
+            fb_format = "1BPP_PAL888";
+            memcpy(local_fb_data->palette, fb_1bpp_palette, sizeof(fb_1bpp_palette));
+            break;
+        }
+      case CYG_FB_FORMAT_2BPP_PAL888:
+        {
+            static const cyg_uint8  fb_2bpp_palette[4 * 3]  = {
+                0x00, 0x00, 0x00,   // colour 0 == black
+                0x54, 0x54, 0x54,   // dark grey
+                0xA8, 0xA8, 0xA8,   // light grey
+                0xFF, 0xFF, 0xFF    // colour 3 == white
+            } ;
+            fb_format = "2BPP_PAL888";
+            memcpy(local_fb_data->palette, fb_2bpp_palette, sizeof(fb_2bpp_palette));
+            break;
+        }
+      case CYG_FB_FORMAT_4BPP_PAL888:
+        fb_format = "4BPP_PAL888";
+        memcpy(local_fb_data->palette, cyg_fb_palette_ega, 16 * 3);
+        break;
+      case CYG_FB_FORMAT_8BPP_PAL888:
+        fb_format = "8BPP_PAL888";
+        memcpy(local_fb_data->palette, cyg_fb_palette_vga, 256 * 3);
+        break;
+      case CYG_FB_FORMAT_8BPP_TRUE_332:
+        fb_format = "8BPP_TRUE_332";
+        break;
+      case CYG_FB_FORMAT_16BPP_TRUE_565:
+        fb_format = "16BPP_TRUE_565";
+        break;
+      case CYG_FB_FORMAT_16BPP_TRUE_555:
+        fb_format = "16BPP_TRUE_555";
+        break;
+      case CYG_FB_FORMAT_32BPP_TRUE_0888:
+        fb_format = "32BPP_TRUE_0888";
+        break;
+    }
+        
+    diag_sprintf(device_data, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%s",
+                 SYNTH_FB_PROTOCOL_VERSION,
+                 fb->fb_driver0,  /* id 0-3   */
+                 fb->fb_depth,
+                 fb->fb_flags0 & CYG_FB_FLAGS0_LE,
+                 fb->fb_width, fb->fb_height,
+#ifdef CYGHWR_IO_FRAMEBUF_FUNCTIONALITY_VIEWPORT
+                 fb->fb_viewport_width, fb->fb_viewport_height,
+#else
+                 fb->fb_width, fb->fb_height,
+#endif
+                 fb->fb_stride,
+                 fb->fb_driver1,    /* number of pages */
+                 fb_format);
+
+    local_fb_data->devid = synth_auxiliary_instantiate("devs/framebuf/synth", SYNTH_MAKESTRING(CYGPKG_DEVS_FRAMEBUF_SYNTH),
+                                                       "framebuf", fb_name, device_data);
+    if (local_fb_data->devid < 0) {
+        // The I/O auxiliary should have reported a suitable error.
+        // Just stick with an in-memory device.
+        diag_printf("cyg_synth_fb_instantiate(): failed to instantiate device, sticking with in-memory framebuffer\n");
+        return;
+    } else {
+        DEBUG(1, "target synth_auxiliary_instantiate(), host-side framebuf utility running\n");
+        // At this point the framebuf.tcl script has run, the window has
+        // been created, the framebuf program has been started, it will
+        // have created the shared memory region and the two fifos, 
+        // passed the names back up to framebuf.tcl, and everything should
+        // be running. This xchgmsg() retrieves the file names from
+        // framebuf.tcl.
+        synth_auxiliary_xchgmsg(local_fb_data->devid, SYNTH_FB_INIT, 0, 0, 0, 0, &reply, (unsigned char*)device_data, &len, 512);
+        // First filename is the shared memory region.
+        filename    = device_data;
+        for (ptr = device_data; *ptr != ';'; ptr++)
+            ;
+        *ptr++  = '\0';
+        DEBUG(1, "target :  Opening shared memory region %s\n", filename);
+        fd = cyg_hal_sys_open(filename, CYG_HAL_SYS_O_RDWR, 0);
+        if (fd < 0) {
+            synth_auxiliary_xchgmsg(local_fb_data->devid, SYNTH_FB_ABORT, 0, 0, 0, 0, 0, 0, 0, 0);
+            return;
+        }
+        shared_fb_data = (synth_fb_data*)cyg_hal_sys_mmap(0,
+                                                          sizeof(synth_fb_data) + (fb->fb_height * fb->fb_stride * fb->fb_driver1),
+                                                          CYG_HAL_SYS_PROT_READ | CYG_HAL_SYS_PROT_WRITE,
+                                                          CYG_HAL_SYS_MAP_SHARED,
+                                                          fd,
+                                                          0
+            );
+        if (shared_fb_data <= 0) {
+            synth_auxiliary_xchgmsg(local_fb_data->devid, SYNTH_FB_ABORT, 0, 0, 0, 0, 0, 0, 0, 0);
+            cyg_hal_sys_close(fd);
+            return;
+        }
+        DEBUG(1, "target:  mmap()'d shared memory region -> %p\n", shared_fb_data);
+        shared_fb_data->devid       = local_fb_data->devid;
+        
+        // Next filename is the fifo to the framebuf program.
+        filename = ptr;
+        for (ptr = device_data; *ptr != ';'; ptr++)
+            ;
+        *ptr++ = '\0';
+        DEBUG(1, "target:  Opening fifo to framebuf %s\n", filename);
+        shared_fb_data->fifo_to_framebuf = cyg_hal_sys_open(filename, CYG_HAL_SYS_O_WRONLY, 0);
+        if (shared_fb_data->fifo_to_framebuf < 0) {
+            synth_auxiliary_xchgmsg(shared_fb_data->devid, SYNTH_FB_ABORT, 0, 0, 0, 0, 0, 0, 0, 0);
+            cyg_hal_sys_close(fd);
+            return;
+        }
+        // And finally the fifo from the framebuf program.
+        filename = ptr;
+        for (ptr = device_data; *ptr != ';'; ptr++)
+            ;
+        *ptr = '\0';
+        DEBUG(1, "target:  Opening fifo from framebuf %s\n", filename);
+        shared_fb_data->fifo_from_framebuf = cyg_hal_sys_open(filename, CYG_HAL_SYS_O_RDONLY, 0);
+        if (shared_fb_data->fifo_from_framebuf < 0) {
+            synth_auxiliary_xchgmsg(shared_fb_data->devid, SYNTH_FB_ABORT, 0, 0, 0, 0, 0, 0, 0, 0);
+            cyg_hal_sys_close(fd);
+            cyg_hal_sys_close(shared_fb_data->fifo_to_framebuf);
+            return;
+        }
+
+        // We have a shared memory region and the two files. Copy
+        // all existing fb_data contents (e.g. the palettes) and
+        // the framebuffer contents to the shared memory region.
+        // The MUST_BE_ON flag is not set for synthetic target
+        // framebuffers so there may already be contents.
+        fb_base  = (cyg_uint8*)fb->fb_base;
+        fb_base -= (fb->fb_height * fb->fb_stride * shared_fb_data->page_drawable);
+        memcpy(&(shared_fb_data->palette[0]), &(local_fb_data->palette[0]), 3 * 256);
+        memcpy(&(shared_fb_data->framebuf[0]), fb_base, fb->fb_height * fb->fb_stride * fb->fb_driver1);
+        shared_fb_data->connected   = 1;
+        fb->fb_driver2              = (CYG_ADDRWORD)shared_fb_data;
+            
+        fb_base     = (cyg_uint8*)&(shared_fb_data->framebuf[0]);
+        fb_base    += (fb->fb_height * fb->fb_stride * shared_fb_data->page_drawable);
+        fb->fb_base = fb_base;
+        *(cyg_uint8**)fb->fb_driver3    = fb_base;
+
+        DEBUG(1, "target:  Fully instantiated, fb_data %p, blank_on %d, display_on %d\n",
+              shared_fb_data, shared_fb_data->blank_on, shared_fb_data->display_on);
+        DEBUG(1, "target:    devid %d, t2h %d, h2t %d\n",
+                    shared_fb_data->devid, shared_fb_data->fifo_to_framebuf, shared_fb_data->fifo_from_framebuf);
+        // Finally tell the framebuf program everything is ready.
+        fb_op(fb, SYNTH_FB_OK);
+        DEBUG(1, "target: Sent SYNTH_FB_OK\n");
+    }
+}
+
+
+// Switch on a framebuffer device. This may get called multiple
+// times, e.g. when switching between different screen modes.
+// It just involves sending a message to the auxiliary.
+static int
+cyg_synth_fb_on(struct cyg_fb* fb)
+{
+    synth_fb_data*  fb_data = (synth_fb_data*) fb->fb_driver2;
+    if (fb_data->connected) {
+        synth_auxiliary_xchgmsg(fb_data->devid, SYNTH_FB_ON, 0, 0, 0, 0, 0, 0, 0, 0);
+    }
+
+    return 0;
+}
+
+static int
+cyg_synth_fb_off(struct cyg_fb* fb)
+{
+    synth_fb_data*  fb_data = (synth_fb_data*) fb->fb_driver2;
+    if (fb_data->connected) {
+        synth_auxiliary_xchgmsg(fb_data->devid, SYNTH_FB_OFF, 0, 0, 0, 0, 0, 0, 0, 0);
+    }
+    return 0;
+}
+
+static int
+cyg_synth_fb_ioctl(struct cyg_fb* fb, cyg_ucount16 key, void* data, size_t* len)
+{
+    synth_fb_data*  fb_data = (synth_fb_data*) fb->fb_driver2;
+    int             result  = ENOSYS;
+
+    switch(key) {
+      case CYG_FB_IOCTL_VIEWPORT_GET_POSITION:
+        DEBUG(1, "cyg_synth_fb_ioctl: viewport_get_position\n");
+        if (fb->fb_flags0 & CYG_FB_FLAGS0_VIEWPORT) {
+            cyg_fb_ioctl_viewport*  viewport = (cyg_fb_ioctl_viewport*)data;
+            CYG_ASSERT(*len == sizeof(cyg_fb_ioctl_viewport), "data argument should be a cyg_fb_ioctl_viewport structure");
+            viewport->fbvp_x    = fb_data->viewport_x;
+            viewport->fbvp_y    = fb_data->viewport_y;
+            result  = 0;
+            DEBUG(1, "                  : current viewport x %d, y %d\n", fb_data->viewport_x, fb_data->viewport_y);
+        } else {
+            DEBUG(1, "                  : framebuffer does not support a viewport\n");
+        }
+        break;
+      case CYG_FB_IOCTL_VIEWPORT_SET_POSITION:
+        DEBUG(1, "cyg_synth_fb_ioctl: viewport_set_position\n");
+        if (fb->fb_flags0 & CYG_FB_FLAGS0_VIEWPORT) {
+            cyg_fb_ioctl_viewport*  viewport = (cyg_fb_ioctl_viewport*)data;
+            CYG_ASSERT(*len == sizeof(cyg_fb_ioctl_viewport), "data argument should be a cyg_fb_ioctl_viewport structure");
+            CYG_ASSERT(((viewport->fbvp_x + fb->fb_viewport_width) <= fb->fb_width) &&
+                       ((viewport->fbvp_y + fb->fb_viewport_height) <= fb->fb_height),
+                       "viewport should be within framebuffer dimensions");
+            DEBUG(1, "                  : setting viewport from x %d, y %d to x %d, y %d\n",
+                  fb_data->viewport_x, fb_data->viewport_y, (int) viewport->fbvp_x, (int) viewport->fbvp_y);
+            if ((fb_data->viewport_x != (int)viewport->fbvp_x) || (fb_data->viewport_y != (int)viewport->fbvp_y)) {
+                fb_data->viewport_x = (int)viewport->fbvp_x;
+                fb_data->viewport_y = (int)viewport->fbvp_y;
+                fb_op(fb, SYNTH_FB_VIEWPORT);
+            }
+            result = 0;
+        } else {
+            DEBUG(1, "                  : framebuffer does not support a viewport\n");
+        }
+        break;
+      case CYG_FB_IOCTL_PAGE_FLIPPING_GET_PAGES:
+        DEBUG(1, "cyg_synth_fb_ioctl: page_flipping_get_pages\n");
+        if (fb->fb_flags0 & CYG_FB_FLAGS0_PAGE_FLIPPING) {
+            cyg_fb_ioctl_page_flip* page_flip = (cyg_fb_ioctl_page_flip*)data;
+            CYG_ASSERT(*len == sizeof(cyg_fb_ioctl_page_flip), "data argument should be a cyg_fb_ioctl_page_flip structure");
+            page_flip->fbpf_number_pages    = fb->fb_driver1;
+            page_flip->fbpf_visible_page    = fb_data->page_visible;
+            page_flip->fbpf_drawable_page   = fb_data->page_drawable;
+            result = 0;
+            DEBUG(1, "                  : number_pages %d, visible page %d, drawable page %d\n",
+                  fb->fb_driver1, fb_data->page_visible, fb_data->page_drawable);
+        } else {
+            DEBUG(1, "                  : framebuffer does not support page flipping\n");
+        }
+        break;
+      case CYG_FB_IOCTL_PAGE_FLIPPING_SET_PAGES:
+        DEBUG(1, "cyg_synth_fb_ioctl: page_flipping_set_pages\n");
+        if (fb->fb_flags0 & CYG_FB_FLAGS0_PAGE_FLIPPING) {
+            cyg_fb_ioctl_page_flip* page_flip = (cyg_fb_ioctl_page_flip*)data;
+            cyg_uint8*  fb_base;
+            
+            CYG_ASSERT(*len == sizeof(cyg_fb_ioctl_page_flip), "data argument should be a cyg_fb_ioctl_page_flip structure");
+            CYG_ASSERT((page_flip->fbpf_visible_page  < fb->driver1) &&
+                       (page_flip->fbpf_drawable_page < fb->driver1),
+                       "framebuffer does not have that many pages");
+            DEBUG(1, "                  : drawable page was %d, now %d, visible page was %d, now %d\n",
+                  fb_data->page_drawable, (int)page_flip->fbpf_drawable_page,
+                  fb_data->page_visible, (int)page_flip->fbpf_visible_page);
+            fb_base  = (cyg_uint8*)fb->fb_base;
+            fb_base -= (fb->fb_height * fb->fb_stride * fb_data->page_drawable);
+            fb_data->page_drawable          = page_flip->fbpf_drawable_page;
+            fb_base += (fb->fb_height * fb->fb_stride * fb_data->page_drawable);
+            fb->fb_base = fb_base;
+            *(cyg_uint8**)fb->fb_driver3 = fb_base;
+            if (fb_data->page_visible != (int)page_flip->fbpf_visible_page) {
+                fb_data->page_visible = (int)page_flip->fbpf_visible_page;
+                fb_op(fb, SYNTH_FB_PAGE_FLIP);
+            }
+            result = 0;
+        } else {
+            DEBUG(1, "                  : framebuffer does not support page flipping\n");
+        }
+        break;
+      case CYG_FB_IOCTL_BLANK_GET:
+        {
+            cyg_fb_ioctl_blank* blank = (cyg_fb_ioctl_blank*)data;
+            DEBUG(1, "cyg_synth_fb_ioctl: blank_get, current on state %d\n", fb_data->blank_on);
+            CYG_ASSERT(*len == sizeof(cyg_fb_ioctl_blank), "data argument should be a cyg_fb_ioctl_blank structure");
+            blank->fbbl_on  = fb_data->blank_on;
+            result = 0;
+        }
+        break;
+      case CYG_FB_IOCTL_BLANK_SET:
+        {
+            cyg_fb_ioctl_blank* blank = (cyg_fb_ioctl_blank*)data;
+            CYG_ASSERT(*len == sizeof(cyg_fb_ioctl_blank), "data argument should be a cyg_fb_ioctl_blank structure");
+            DEBUG(1, "cyg_synth_fb_ioctl: blank_set, on was %d, now %d\n", fb_data->blank_on, blank->fbbl_on);
+            if (blank->fbbl_on != fb_data->blank_on) {
+                fb_data->blank_on = blank->fbbl_on;
+                fb_op(fb, SYNTH_FB_BLANK);
+            }
+            result = 0;
+        }
+        break;
+      default:
+        result  = ENOSYS;
+        break;
+    }
+    return result;
+}
+
+void
+cyg_synth_fb_synch(struct cyg_fb* fb, cyg_ucount16 when)
+{
+    // FIXME: update synch_x0/y0/x1/y1 once the generic framebuffer
+    // code actually maintains a bounding box.
+    fb_op(fb, SYNTH_FB_SYNC);
+}
+
+#ifdef CYGHWR_DEVS_FRAMEBUF_SYNTH_FUNCTIONALITY_PALETTED
+// The palette is held in the synth_fb_data structure.
+static void
+cyg_synth_fb_read_palette(struct cyg_fb* fb, cyg_ucount32 first, cyg_ucount32 count, void* dest)
+{
+    synth_fb_data*  fb_data = (synth_fb_data*) fb->fb_driver2;
+    CYG_ASSERT(fb->fb_flags0 & CYG_FB_FLAGS0_PALETTE, "reading palette of non-paletted display");
+    CYG_ASSERT((first + count) <= (0x01 << fb->fb_depth), "palette size exceeded");
+
+    memcpy(dest, &(fb_data->palette[3 * first]), 3 * count);
+}
+
+static void
+cyg_synth_fb_write_palette(struct cyg_fb* fb, cyg_ucount32 first, cyg_ucount32 count, const void* source, cyg_ucount16 when)
+{
+    synth_fb_data*  fb_data = (synth_fb_data*) fb->fb_driver2;
+    CYG_ASSERT(fb->fb_flags0 & CYG_FB_FLAGS0_PALETTE, "reading palette of non-paletted display");
+    CYG_ASSERT((first + count) <= (0x01 << fb->fb_depth), "palette size exceeded");
+
+    DEBUG(1, "write_palette: fb %p, first %d, count %d, source %p\n", fb, first, count, source);
+    memcpy(&(fb_data->palette[3 * first]), source, 3 * count);
+    fb_op(fb, SYNTH_FB_WRITE_PALETTE);
+    CYG_UNUSED_PARAM(cyg_ucount16, when);
+}
+#endif
+
+#define LINEAR1(_fn_, _suffix_)  cyg_fb_linear_ ## _fn_ ## _ ## _suffix_
+#define LINEAR( _fn_, _suffix_)  LINEAR1(_fn_, _suffix_)
+
+#ifdef CYGPKG_DEVS_FRAMEBUF_SYNTH_FB0
+# ifdef CYGNUM_DEVS_FRAMEBUF_SYNTH_FB0_PAGE_FLIPPING
+#  define FB0_PAGES CYGNUM_DEVS_FRAMEBUF_SYNTH_FB0_PAGE_FLIPPING
+# else
+#  define FB0_PAGES 1
+#endif
+
+// A default area of memory for the framebuffer, if the auxiliary is not
+// running.
+static cyg_uint8            cyg_synth_fb0_default_base[CYG_FB_fb0_HEIGHT * CYG_FB_fb0_STRIDE * FB0_PAGES];
+
+// Pointer to framebuffer memory. This defaults to a statically
+// allocated memory but will switch to a shared memory region if
+// the auxiliary is running. It may also change if page flipping
+// is enabled.
+cyg_uint8*  cyg_synth_fb0_base  = cyg_synth_fb0_default_base;
+
+// Driver-specific data needed for interacting with the auxiliary.
+static synth_fb_data    cyg_synth_fb0_data;
+
+CYG_FB_FRAMEBUFFER(CYG_FB_fb0_STRUCT,
+                   CYG_FB_fb0_DEPTH,
+                   CYG_FB_fb0_FORMAT,
+                   CYG_FB_fb0_WIDTH,
+                   CYG_FB_fb0_HEIGHT,
+                   CYG_FB_fb0_VIEWPORT_WIDTH,
+                   CYG_FB_fb0_VIEWPORT_HEIGHT,
+                   cyg_synth_fb0_default_base,
+                   CYG_FB_fb0_STRIDE,
+                   CYG_FB_fb0_FLAGS0,
+                   CYG_FB_fb0_FLAGS1,
+                   CYG_FB_fb0_FLAGS2,
+                   CYG_FB_fb0_FLAGS3,
+                   (CYG_ADDRWORD) 0,  // id, 0 - 3
+                   (CYG_ADDRWORD) FB0_PAGES,
+                   (CYG_ADDRWORD) &cyg_synth_fb0_data,
+                   (CYG_ADDRWORD) &cyg_synth_fb0_base,
+                   &cyg_synth_fb_on,
+                   &cyg_synth_fb_off,
+                   &cyg_synth_fb_ioctl,
+                   &cyg_synth_fb_synch,
+                   &CYG_FB_fb0_READ_PALETTE_FN,
+                   &CYG_FB_fb0_WRITE_PALETTE_FN,
+                   &CYG_FB_fb0_MAKE_COLOUR_FN,
+                   &CYG_FB_fb0_BREAK_COLOUR_FN,
+                   LINEAR(write_pixel, CYG_FB_fb0_SUFFIX),
+                   LINEAR(read_pixel, CYG_FB_fb0_SUFFIX),
+                   LINEAR(write_hline, CYG_FB_fb0_SUFFIX),
+                   LINEAR(write_vline, CYG_FB_fb0_SUFFIX),
+                   LINEAR(fill_block, CYG_FB_fb0_SUFFIX),
+                   LINEAR(write_block, CYG_FB_fb0_SUFFIX),
+                   LINEAR(read_block, CYG_FB_fb0_SUFFIX),
+                   LINEAR(move_block, CYG_FB_fb0_SUFFIX),
+                   0, 0, 0, 0       // Spare0 -> spare3
+    );
+                   
+#endif
+
+#ifdef CYGPKG_DEVS_FRAMEBUF_SYNTH_FB1
+
+# ifdef CYGNUM_DEVS_FRAMEBUF_SYNTH_FB1_PAGE_FLIPPING
+#  define FB1_PAGES CYGNUM_DEVS_FRAMEBUF_SYNTH_FB1_PAGE_FLIPPING
+# else
+#  define FB1_PAGES 1
+#endif
+static cyg_uint8 cyg_synth_fb1_default_base[CYG_FB_fb1_HEIGHT * CYG_FB_fb1_STRIDE * FB1_PAGES];
+cyg_uint8*  cyg_synth_fb1_base  = cyg_synth_fb1_default_base;
+static synth_fb_data    cyg_synth_fb1_data;
+
+CYG_FB_FRAMEBUFFER(CYG_FB_fb1_STRUCT,
+                   CYG_FB_fb1_DEPTH,
+                   CYG_FB_fb1_FORMAT,
+                   CYG_FB_fb1_WIDTH,
+                   CYG_FB_fb1_HEIGHT,
+                   CYG_FB_fb1_VIEWPORT_WIDTH,
+                   CYG_FB_fb1_VIEWPORT_HEIGHT,
+                   cyg_synth_fb1_default_base,
+                   CYG_FB_fb1_STRIDE,
+                   CYG_FB_fb1_FLAGS0,
+                   CYG_FB_fb1_FLAGS1,
+                   CYG_FB_fb1_FLAGS2,
+                   CYG_FB_fb1_FLAGS3,
+                   (CYG_ADDRWORD) 1,  // id, 0 - 3
+                   (CYG_ADDRWORD) FB1_PAGES,
+                   (CYG_ADDRWORD) &cyg_synth_fb1_data,
+                   (CYG_ADDRWORD) &cyg_synth_fb1_base,
+                   &cyg_synth_fb_on,
+                   &cyg_synth_fb_off,
+                   &cyg_synth_fb_ioctl,
+                   &cyg_synth_fb_synch,
+                   &CYG_FB_fb1_READ_PALETTE_FN,
+                   &CYG_FB_fb1_WRITE_PALETTE_FN,
+                   &CYG_FB_fb1_MAKE_COLOUR_FN,
+                   &CYG_FB_fb1_BREAK_COLOUR_FN,
+                   LINEAR(write_pixel, CYG_FB_fb1_SUFFIX),
+                   LINEAR(read_pixel, CYG_FB_fb1_SUFFIX),
+                   LINEAR(write_hline, CYG_FB_fb1_SUFFIX),
+                   LINEAR(write_vline, CYG_FB_fb1_SUFFIX),
+                   LINEAR(fill_block, CYG_FB_fb1_SUFFIX),
+                   LINEAR(write_block, CYG_FB_fb1_SUFFIX),
+                   LINEAR(read_block, CYG_FB_fb1_SUFFIX),
+                   LINEAR(move_block, CYG_FB_fb1_SUFFIX),
+                   0, 0, 0, 0       // Spare0 -> spare3
+    );
+                   
+#endif
+
+#ifdef CYGPKG_DEVS_FRAMEBUF_SYNTH_FB2
+
+# ifdef CYGNUM_DEVS_FRAMEBUF_SYNTH_FB2_PAGE_FLIPPING
+#  define FB2_PAGES CYGNUM_DEVS_FRAMEBUF_SYNTH_FB2_PAGE_FLIPPING
+# else
+#  define FB2_PAGES 1
+#endif
+static cyg_uint8 cyg_synth_fb2_default_base[CYG_FB_fb2_HEIGHT * CYG_FB_fb2_STRIDE * FB2_PAGES];
+cyg_uint8*  cyg_synth_fb2_base  = cyg_synth_fb2_default_base;
+static synth_fb_data    cyg_synth_fb2_data;
+
+CYG_FB_FRAMEBUFFER(CYG_FB_fb2_STRUCT,
+                   CYG_FB_fb2_DEPTH,
+                   CYG_FB_fb2_FORMAT,
+                   CYG_FB_fb2_WIDTH,
+                   CYG_FB_fb2_HEIGHT,
+                   CYG_FB_fb2_VIEWPORT_WIDTH,
+                   CYG_FB_fb2_VIEWPORT_HEIGHT,
+                   cyg_synth_fb2_default_base,
+                   CYG_FB_fb2_STRIDE,
+                   CYG_FB_fb2_FLAGS0,
+                   CYG_FB_fb2_FLAGS1,
+                   CYG_FB_fb2_FLAGS2,
+                   CYG_FB_fb2_FLAGS3,
+                   (CYG_ADDRWORD) 2,  // id, 0 - 3
+                   (CYG_ADDRWORD) FB2_PAGES,
+                   (CYG_ADDRWORD) &cyg_synth_fb2_data,
+                   (CYG_ADDRWORD) &cyg_synth_fb2_base,
+                   &cyg_synth_fb_on,
+                   &cyg_synth_fb_off,
+                   &cyg_synth_fb_ioctl,
+                   &cyg_synth_fb_synch,
+                   &CYG_FB_fb2_READ_PALETTE_FN,
+                   &CYG_FB_fb2_WRITE_PALETTE_FN,
+                   &CYG_FB_fb2_MAKE_COLOUR_FN,
+                   &CYG_FB_fb2_BREAK_COLOUR_FN,
+                   LINEAR(write_pixel, CYG_FB_fb2_SUFFIX),
+                   LINEAR(read_pixel, CYG_FB_fb2_SUFFIX),
+                   LINEAR(write_hline, CYG_FB_fb2_SUFFIX),
+                   LINEAR(write_vline, CYG_FB_fb2_SUFFIX),
+                   LINEAR(fill_block, CYG_FB_fb2_SUFFIX),
+                   LINEAR(write_block, CYG_FB_fb2_SUFFIX),
+                   LINEAR(read_block, CYG_FB_fb2_SUFFIX),
+                   LINEAR(move_block, CYG_FB_fb2_SUFFIX),
+                   0, 0, 0, 0       // Spare0 -> spare3
+    );
+                   
+#endif
+
+#ifdef CYGPKG_DEVS_FRAMEBUF_SYNTH_FB3
+
+# ifdef CYGNUM_DEVS_FRAMEBUF_SYNTH_FB3_PAGE_FLIPPING
+#  define FB3_PAGES CYGNUM_DEVS_FRAMEBUF_SYNTH_FB3_PAGE_FLIPPING
+# else
+#  define FB3_PAGES 1
+#endif
+static cyg_uint8 cyg_synth_fb3_default_base[CYG_FB_fb3_HEIGHT * CYG_FB_fb3_STRIDE * FB3_PAGES];
+cyg_uint8*  cyg_synth_fb3_base  = cyg_synth_fb3_default_base;
+static synth_fb_data    cyg_synth_fb3_data;
+
+CYG_FB_FRAMEBUFFER(CYG_FB_fb3_STRUCT,
+                   CYG_FB_fb3_DEPTH,
+                   CYG_FB_fb3_FORMAT,
+                   CYG_FB_fb3_WIDTH,
+                   CYG_FB_fb3_HEIGHT,
+                   CYG_FB_fb3_VIEWPORT_WIDTH,
+                   CYG_FB_fb3_VIEWPORT_HEIGHT,
+                   cyg_synth_fb3_default_base,
+                   CYG_FB_fb3_STRIDE,
+                   CYG_FB_fb3_FLAGS0,
+                   CYG_FB_fb3_FLAGS1,
+                   CYG_FB_fb3_FLAGS2,
+                   CYG_FB_fb3_FLAGS3,
+                   (CYG_ADDRWORD) 3,  // id, 0 - 3
+                   (CYG_ADDRWORD) FB3_PAGES,
+                   (CYG_ADDRWORD) &cyg_synth_fb3_data,
+                   (CYG_ADDRWORD) &cyg_synth_fb3_base,
+                   &cyg_synth_fb_on,
+                   &cyg_synth_fb_off,
+                   &cyg_synth_fb_ioctl,
+                   &cyg_synth_fb_synch,
+                   &CYG_FB_fb3_READ_PALETTE_FN,
+                   &CYG_FB_fb3_WRITE_PALETTE_FN,
+                   &CYG_FB_fb3_MAKE_COLOUR_FN,
+                   &CYG_FB_fb3_BREAK_COLOUR_FN,
+                   LINEAR(write_pixel, CYG_FB_fb3_SUFFIX),
+                   LINEAR(read_pixel, CYG_FB_fb3_SUFFIX),
+                   LINEAR(write_hline, CYG_FB_fb3_SUFFIX),
+                   LINEAR(write_vline, CYG_FB_fb3_SUFFIX),
+                   LINEAR(fill_block, CYG_FB_fb3_SUFFIX),
+                   LINEAR(write_block, CYG_FB_fb3_SUFFIX),
+                   LINEAR(read_block, CYG_FB_fb3_SUFFIX),
+                   LINEAR(move_block, CYG_FB_fb3_SUFFIX),
+                   0, 0, 0, 0       // Spare0 -> spare3
+    );
+                   
+#endif
new file mode 100644
--- /dev/null
+++ b/packages/devs/framebuf/synth/current/src/synthfb_init.cxx
@@ -0,0 +1,70 @@
+//==========================================================================
+//
+//      synthfb_init.cxx
+//
+//      Instantiate one or more framebuffer devices for the synthetic target.
+//
+//==========================================================================
+//###ECOSGPLCOPYRIGHTBEGIN####
+//-------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2008 Free Software Foundation, Inc.
+// eCos 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.
+//
+// eCos 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 eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//###DESCRIPTIONBEGIN####
+//
+// Author(s):     bartv
+// Date:          2007-02-0
+//
+//###DESCRIPTIONEND####
+//========================================================================
+
+#include <pkgconf/devs_framebuf_synth.h>
+#include <cyg/io/framebuf.h>
+
+extern "C" void _cyg_synth_fb_instantiate(struct cyg_fb*);
+                                          
+class _synth_fb_init {
+    
+  public:
+    _synth_fb_init(void)
+    {
+#ifdef CYGPKG_DEVS_FRAMEBUF_SYNTH_FB0
+        _cyg_synth_fb_instantiate(&cyg_synth_fb0);
+#endif        
+#ifdef CYGPKG_DEVS_FRAMEBUF_SYNTH_FB1
+        _cyg_synth_fb_instantiate(&cyg_synth_fb1);
+#endif        
+#ifdef CYGPKG_DEVS_FRAMEBUF_SYNTH_FB2
+        _cyg_synth_fb_instantiate(&cyg_synth_fb2);
+#endif        
+#ifdef CYGPKG_DEVS_FRAMEBUF_SYNTH_FB3
+        _cyg_synth_fb_instantiate(&cyg_synth_fb3);
+#endif        
+    }
+};
+
+static _synth_fb_init _synth_fb_init_object CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_IO);