[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xine-cvslog
Subject:    [xine-cvs] HG: xine-lib-1.2-plugin-loader: [18/35] Merge from 1.2
From:       Darren Salt <linux () youmustbejoking ! demon ! co ! uk>
Date:       2007-06-21 22:31:46
Message-ID: 3e9d711a77870cbbca8d.1182464857:18 () hg ! debian ! org
[Download RAW message or body]

# [node df73844e8a47005bef76ffe6cd9323d8e6a1c218 part 18]

diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 \
                doc/hackersguide/output.docbook
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/hackersguide/output.docbook	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,668 @@
+<chapter id="output">
+ <title>xine's output layer</title>
+
+ <sect1>
+  <title>Post plugin layer</title>
+  <para>
+   In this section you will learn, how the powerful post plugin architecture
+   works and how to write post plugins.
+  </para>
+  <sect2>
+   <title>General principle of post plugins</title>
+   <para>
+    The name "post plugin" comes from "postprocessing" which already describes
+    what these plugins are supposed to do: they take video frames, audio
+    buffers or subpicture planes as they leave the decoders and apply arbitrary
+    processing to them. Then they pass processed elements on to the output
+    loops. Post plugins can not only be chained to process the predecessor's
+    output and advance the data to their successor, they can form arbitrary trees,
+    since post plugins can have any number of inputs and outputs. Additionally,
+    the interconnection of the plugins currently inserted in such a tree can
+    be changed on the fly during playback. The public function
+    <function>xine_post_wire()</function> is used by frontends to form such
+    connections.
+   </para>
+   <para>
+    Due to the variety of possible applications, the interface post plugins have
+    to implement is just the basic foundation. The complexity comes from hooking
+    your post plugin into the engine data paths for video frames and audio buffers,
+    intercepting the data and performing your operation on them. This is done by
+    taking the interface of a video or audio port, replacing some of the functions
+    with your own ones and passing the interface to the decoder or predecessor
+    post plugin that is going to feed you with data by accessing this interface
+    and by doing that, calling the functions you provide. From there you can do
+    almost anything you want. Constructing video frames from audio buffers to
+    visualize sound is possible as well as just outputting an integer giving the
+    average brightness of an image. It is also possible to invent post plugins
+    with no output (not very useful, unless the plugin has some side-effect) or
+    no input at all; for the latter you have to create your own pthread, otherwise
+    your plugin will not do anything. An audio signal generator could be
+    implemented like this. The various data types, post plugins can
+    accept as input or offer as output are defined in <filename>xine.h</filename>
+    as <varname>XINE_POST_DATA_*</varname> defines.
+   </para>
+   <para>
+    Some terminology used in the following explanations:
+    <itemizedlist>
+     <listitem>
+      <para>
+       <varname>down direction</varname>:
+       The direction from the decoders to the output. This is the way video or audio
+       data (actual content and meta information) usually travels through the \
engine. +      </para>
+     </listitem>
+     <listitem>
+      <para>
+       <varname>up direction</varname>:
+       The direction from the output to the decoders. This is the way some video or \
audio +       metadata like metronom timestamps travel through the engine.
+      </para>
+     </listitem>
+     <listitem>
+      <para>
+       <varname>interception</varname>:
+       Post plugins are inserted into the engine data paths by the means of the \
decorator +       design pattern. This works by taking engine structures with member \
funtions like +       video or audio ports, video frames or overlay managers and \
inserting your own functions +       into a copy of this structure. This is called \
interception. This modified structure +       is then passed up to the plugin that \
uses it and thus calls your replaced functions. +      </para>
+     </listitem>
+    </itemizedlist>
+   </para>
+  </sect2>
+  <sect2>
+   <title>Writing a xine post plugin</title>
+   <para>
+    The post plugin API is declared in <filename>src/xine-engine/post.h</filename>
+    The plugin info of post plugins contains the post plugin type, which is one of \
the +    <varname>XINE_POST_TYPE_*</varname> defines and the init_class function of \
the plugin. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;post_plugin_t *open_plugin(post_class_t \
*class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t \
**video_target);</programlisting> +    Returns an instance of the plugin. Some post \
plugins evaluate <varname>inputs</varname> +    to open a variable number of inputs. \
Since almost all post plugins have audio or video +    outputs, you can hand in a \
NULL-terminated array of ports to connect to these outputs. +    In this function you \
can also intercept these ports so that your plugin is actually used. +    There is a \
helper function to initialize a <type>post_plugin_t</type>, which you are +    \
encouraged to use: <function>_x_post_init()</function>. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;char *get_identifier(post_class_t \
*class_gen);</programlisting> +    This function returns a short identifier \
describing the plugin. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;char *get_description(post_class_t \
*class_gen);</programlisting> +    This function returns a plaintext, one-line string \
describing the plugin. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;void dispose(post_class_t \
*class_gen);</programlisting> +    This function frees the memory used by the video \
out plugin class object. +   </para>
+   <para>
+    The <type>post_plugin_t</type> structure contains the publicly visible
+    part of the post plugin with the audio and video inputs and the type of
+    the post plugin. Not publicly visible are the lists of all inputs and outputs,
+    the <function>dispose()</function> function and some internal stuff which
+    plugins do not have to worry about.
+   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;void dispose(post_plugin_t \
*this_gen);</programlisting> +    This function frees the memory used by the plugin \
instance, but not necessarily +    immediately. Since post plugins enter their own \
functions into engine structures, +    they might still be needed when \
<function>dispose()</function> is being called. +    They maintain a usage counter to \
detect that. To check for such a condition, you +    should use the \
<function>_x_post_dispose()</function> helper function like that: +    \
<programlisting> +&nbsp;&nbsp;&nbsp;if (_x_post_dispose(this))
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;really_free(this);</programlisting>
+    <function>_x_post_dispose()</function> frees any ressources allocated by any of \
the  +    post plugin helper functions and returns boolean true, if the plugin is not \
needed +    any more.
+   </para>
+  </sect2>
+  <sect2>
[... 416 lines omitted ...]
+     <para>
+      Most important, the ability to render/copy a given 
+      frame to the output device.
+     </para>
+    </listitem>
+    <listitem>
+     <para>
+      Optionally the copying of the frame from a file dependant 
+      colour-space and depth into the frame structure. This is to allow for
+      on-the fly colour-space conversion and scaling if required (e.g. the XShm
+      ouput plugin uses this mechanism).
+     </para>
+    </listitem>
+   </itemizedlist>
+  </para>
+  <para>
+   Although these extra responsibilities add great complexity to your
+   plugin it should be noted that they allow plugins to take full advantage
+   of any special hardware-acceleration without sacrificing flexibility.
+  </para>
+  <sect2>
+   <title>Writing a xine video out plugin</title>
+   <para>
+    The video out plugin API is declared in \
<filename>src/xine-engine/video_out.h</filename> +    The plugin info of video out \
plugins contains the visual type, priority, +    and the init_class function of the \
plugin. +   </para>
+   <para>
+    The <varname>visual_type</varname> field is used by xine to
+    determine if the GUI used by the client is supported by the plugin
+    (e.g. X11 output plugins require the GUI to be running under the
+    X Windowing system) and also to determine the type of information passed to the 
+    <function>open_plugin()</function> function as its <varname>visual</varname> \
parameter. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;char *get_description(video_driver_class_t \
*this_gen);</programlisting> +    This function returns a plaintext, one-line string \
describing the plugin. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;char *get_identifier(video_driver_class_t \
*this_gen);</programlisting> +    This function returns a shorter identifier \
describing the plugin. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;void dispose(video_driver_class_t \
*this_gen);</programlisting> +    This function frees the memory used by the video \
out plugin class object. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;vo_driver_t *get_instance(video_driver_class_t \
*class_gen, const void *visual);</programlisting> +    Returns an instance of the \
plugin. +    The <varname>visual</varname> is a pointer to a visual-dependant
+    structure/variable. For example, if you had previously claimed your
+    plugin was of the VISUAL_TYPE_X11 type, this would be a pointer
+    to a <type>x11_visual_t</type>, which amongst other things hold the 
+    <type>Display</type> variable associated with the
+    X-server xine should display to. See plugin source-code for other
+    VISUAL_TYPE_* constants and associated structures. Note that this
+    field is provided by the client application and so if you wish to add another \
visual +    type you will either need to extend an existing client or write a new
+    one.
+   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;uint32_t get_capabilities(vo_driver_t \
*this_gen);</programlisting> +    Returns a bit mask describing the output plugin's \
capabilities. +    You may logically OR the <varname>VO_CAP_*</varname> constants \
together to get +    a suitable bit-mask (via the '|' operator).
+   </para>
+   <para>
+    <programlisting>
+&nbsp;&nbsp;&nbsp;int get_property(vo_driver_t *self, int property);
+&nbsp;&nbsp;&nbsp;int set_property(vo_driver_t *self, int property, int value);
+&nbsp;&nbsp;&nbsp;void get_property_min_max(vo_driver_t *self, int property, int \
*min, int *max);</programlisting> +    Handle the getting, setting of properties and \
define their bounds.  +    Valid property IDs can be found in the \
<filename>video_out.h</filename> +    header file.
+   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;int gui_data_exchange(vo_driver_t *self, int \
data_type, void *data);</programlisting> +    Accepts various forms of data from the \
UI (e.g. the mouse has moved or the +    window has been hidden). Look at existing \
plugins for examples of data +    exchanges from various UIs.
+   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;vo_frame_t *alloc_frame(vo_driver_t \
*self);</programlisting> +    Returns a pointer to a xine video frame.
+    Typically the video plugin will add private fields to the end of the
+    <type>vo_frame_t</type> structure which are used for internal purposes by the \
plugin. +   </para>
+   <para>
+    The function pointers within the frame structure provide a mechanism for the
+    driver to retain full control of how the frames are managed and rendered to. If
+    the VO_CAP_COPIES_IMAGE flag was set in the plugins capabilities then the
+    copy field is required and will be called sequentially for each 16-pixel high
+    strip in the image. The plugin may then decide, based on the frame's format, how
+    this is copied into the frame.
+   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;void update_frame_format(vo_driver_t *self, \
vo_frame_t *img, uint32_t width, uint32_t height, double ratio, int format, int \
flags);</programlisting> +    This function will be called each time the \
colour-depth/space or size of a frame changes. +    Typically this function would \
allocate sufficient memory for the frame, assign the pointers +    to the individual \
planes of the frame to the <varname>base</varname> field of the +    frame and \
perform any driver-specific changes. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;void display_frame(vo_driver_t *self, \
vo_frame_t *vo_img);</programlisting> +    Renders a given frame to the output \
device. +   </para>
+   <para>
+    <programlisting>
+&nbsp;&nbsp;&nbsp;void overlay_begin(vo_driver_t *self, vo_frame_t *vo_img, int \
changed); +&nbsp;&nbsp;&nbsp;void overlay_blend(vo_driver_t *self, vo_frame_t \
*vo_img, vo_overlay_t *overlay); +&nbsp;&nbsp;&nbsp;void overlay_end(vo_driver_t \
*self, vo_frame_t *vo_img);</programlisting> +    These are used to blend overlays on \
frames. <function>overlay_begin()</function> is called, +    when the overlay appears \
for the first time, <function>overlay_blend()</function> is then +    called for \
every subsequent frame and <function>overlay_end()</function> is called, when +    \
the overlay should disappear again. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;int redraw_needed(vo_driver_t \
*self);</programlisting> +    Queries the driver, if the current frame needs to be \
drawn again. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;void dispose(vo_driver_t \
*self);</programlisting> +    Releases all resources and frees the plugin.
+   </para>
+  </sect2>
+ </sect1>
+
+</chapter>
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 \
                doc/hackersguide/overlays.svg
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/hackersguide/overlays.svg	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,256 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Creator: fig2dev Version 3.2 Patchlevel 5 -->
+<!-- CreationDate: Sat Jun  2 20:47:40 2007 -->
+<!-- Magnification: 1.050 -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="7.3in"
+   height="3.1in"
+   viewBox="507 1499 8812 3757"
+   id="svg4078"
+   sodipodi:version="0.32"
+   inkscape:version="0.45.1"
+   sodipodi:docname="overlays.svg"
+   sodipodi:docbase="/home/flame/devel/repos/xine/xine-lib-1.2-newdocbook/doc/hackersguide"
 +   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <metadata
+     id="metadata4139">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs4137" />
+  <sodipodi:namedview
+     inkscape:window-height="611"
+     inkscape:window-width="722"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     guidetolerance="10.0"
+     gridtolerance="10.0"
+     objecttolerance="10.0"
+     borderopacity="1.0"
+     bordercolor="#666666"
+     pagecolor="#ffffff"
+     id="base"
+     inkscape:zoom="0.96194825"
+     inkscape:cx="328.5"
+     inkscape:cy="139.5"
+     inkscape:window-x="164"
+     inkscape:window-y="25"
+     inkscape:current-layer="svg4078" />
+  <rect
+     style="fill:#ffffff;fill-opacity:1"
+     id="rect4141"
+     width="9029.1113"
+     height="3933.6128"
+     x="419.44238"
+     y="1434.3762" />
+  <g
+     style="stroke-width:.025in; stroke:black; fill:none"
+     id="g4080">
+<!-- Line: box -->    <rect
+       x="3779"
+       y="2456"
+       width="2173"
+       height="1275"
+       rx="0"
+       style="stroke:#000000;stroke-width:8; stroke-linejoin:miter; \
stroke-linecap:butt; " +       id="rect4082" />
+<!-- Text -->    <text
+       xml:space="preserve"
+       x="4346"
+       y="3165"
+       stroke="#000000"
+       fill="#000000"
+       font-family="Helvetica Narrow"
+       font-style="normal"
+       font-weight="normal"
+       font-size="177"
+       text-anchor="start"
+       id="text4084">OSD renderer</text>
+<!-- Line: box -->    <rect
+       x="519"
+       y="4015"
+       width="2314"
+       height="566"
+       rx="0"
+       style="stroke:#000000;stroke-width:8; stroke-linejoin:miter; \
stroke-linecap:butt; " +       id="rect4086" />
+<!-- Text -->    <text
+       xml:space="preserve"
+       x="944"
+       y="4393"
+       stroke="#000000"
+       fill="#000000"
+       font-family="Helvetica Narrow"
+       font-style="normal"
+       font-weight="normal"
+       font-size="177"
+       text-anchor="start"
+       id="text4088">public libxine API</text>
+<!-- Line: box -->    <rect
+       x="519"
+       y="3023"
+       width="2314"
+       height="566"
+       rx="0"
+       style="stroke:#000000;stroke-width:8; stroke-linejoin:miter; \
stroke-linecap:butt; " +       id="rect4090" />
+<!-- Text -->    <text
+       xml:space="preserve"
+       x="708"
+       y="3401"
+       stroke="#000000"
+       fill="#000000"
+       font-family="Helvetica Narrow"
+       font-style="normal"
+       font-weight="normal"
+       font-size="177"
+       text-anchor="start"
+       id="text4092">libsputext (text subtitles)</text>
+<!-- Line: box -->    <rect
+       x="519"
[... 4 lines omitted ...]
+       style="stroke:#000000;stroke-width:8; stroke-linejoin:miter; \
stroke-linecap:butt; " +       id="rect4094" />
+<!-- Text -->    <text
+       xml:space="preserve"
+       x="614"
+       y="2645"
+       stroke="#000000"
+       fill="#000000"
+       font-family="Helvetica Narrow"
+       font-style="normal"
+       font-weight="normal"
+       font-size="177"
+       text-anchor="start"
+       id="text4096">libspucc (closed captions)</text>
+<!-- Line: box -->    <rect
+       x="6755"
+       y="1653"
+       width="2551"
+       height="1275"
+       rx="0"
+       style="stroke:#000000;stroke-width:8; stroke-linejoin:miter; \
stroke-linecap:butt; " +       id="rect4098" />
+<!-- Text -->    <text
+       xml:space="preserve"
+       x="7322"
+       y="2362"
+       stroke="#000000"
+       fill="#000000"
+       font-family="Helvetica Narrow"
+       font-style="normal"
+       font-weight="normal"
+       font-size="177"
+       text-anchor="start"
+       id="text4100">overlay manager</text>
+<!-- Line: box -->    <rect
+       x="6755"
+       y="3968"
+       width="2551"
+       height="1275"
+       rx="0"
+       style="stroke:#000000;stroke-width:8; stroke-linejoin:miter; \
stroke-linecap:butt; " +       id="rect4102" />
+<!-- Text -->    <text
+       xml:space="preserve"
+       x="7653"
+       y="4677"
+       stroke="#000000"
+       fill="#000000"
+       font-family="Helvetica Narrow"
+       font-style="normal"
+       font-weight="normal"
+       font-size="177"
+       text-anchor="start"
+       id="text4104">video out</text>
+<!-- Line: box -->    <rect
+       x="519"
+       y="1511"
+       width="2314"
+       height="566"
+       rx="0"
+       style="stroke:#000000;stroke-width:8; stroke-linejoin:miter; \
stroke-linecap:butt; " +       id="rect4106" />
+<!-- Text -->    <text
+       xml:space="preserve"
+       x="614"
+       y="1889"
+       stroke="#000000"
+       fill="#000000"
+       font-family="Helvetica Narrow"
+       font-style="normal"
+       font-weight="normal"
+       font-size="177"
+       text-anchor="start"
+       id="text4108">libspudec (DVD subtitles)</text>
+<!-- Line -->    <polyline
+       points="2834,4299 3259,4299 3259,3543 3761,3543 "
+       style="stroke:#000000;stroke-width:8; stroke-linejoin:miter; \
stroke-linecap:butt; " +       id="polyline4110" />
+<!-- Arrowhead on XXXpoint 3259 3543 - 3795 3543-->    <polyline
+       points="3651 3574 3777 3543 3651 3511 "
+       style="stroke:#000000;stroke-width:8; "
+       id="polyline4112" />
+<!-- Line -->    <polyline
+       points="2834,1795 6738,1795 "
+       style="stroke:#000000;stroke-width:8; stroke-linejoin:miter; \
stroke-linecap:butt; " +       id="polyline4114" />
+<!-- Arrowhead on XXXpoint 2834 1795 - 6771 1795-->    <polyline
+       points="6627 1826 6753 1795 6627 1763 "
+       style="stroke:#000000;stroke-width:8; "
+       id="polyline4116" />
+<!-- Line -->    <polyline
+       points="2834,3307 3761,3307 "
+       style="stroke:#000000;stroke-width:8; stroke-linejoin:miter; \
stroke-linecap:butt; " +       id="polyline4118" />
+<!-- Arrowhead on XXXpoint 2834 3307 - 3795 3307-->    <polyline
+       points="3651 3338 3777 3307 3651 3275 "
+       style="stroke:#000000;stroke-width:8; "
+       id="polyline4120" />
+<!-- Line -->    <polyline
+       points="8031,2946 8031,3950 "
+       style="stroke:#000000;stroke-width:8; stroke-linejoin:miter; \
stroke-linecap:butt; " +       id="polyline4122" />
+<!-- Arrowhead on XXXpoint 8031 2929 - 8031 3984-->    <polyline
+       points="8000 3840 8031 3966 8062 3840 "
+       style="stroke:#000000;stroke-width:8; "
+       id="polyline4124" />
+<!-- Arrowhead on XXXpoint 8031 3968 - 8031 2913-->    <polyline
+       points="8062 3057 8031 2931 8000 3057 "
+       style="stroke:#000000;stroke-width:8; "
+       id="polyline4126" />
+<!-- Line -->    <polyline
+       points="5952,2692 6738,2692 "
+       style="stroke:#000000;stroke-width:8; stroke-linejoin:miter; \
stroke-linecap:butt; " +       id="polyline4128" />
+<!-- Arrowhead on XXXpoint 5952 2692 - 6771 2692-->    <polyline
+       points="6627 2724 6753 2692 6627 2661 "
+       style="stroke:#000000;stroke-width:8; "
+       id="polyline4130" />
+<!-- Line -->    <polyline
+       points="2834,2551 3761,2551 "
+       style="stroke:#000000;stroke-width:8; stroke-linejoin:miter; \
stroke-linecap:butt; " +       id="polyline4132" />
+<!-- Arrowhead on XXXpoint 2834 2551 - 3795 2551-->    <polyline
+       points="3651 2582 3777 2551 3651 2519 "
+       style="stroke:#000000;stroke-width:8; "
+       id="polyline4134" />
+  </g>
+</svg>
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 \
                doc/hackersguide/overview.docbook
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/hackersguide/overview.docbook	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,811 @@
+<chapter id="overview">
+ <title>xine code overview</title>
+
+ <sect1>
+  <title>Walking the source tree</title>
+  <para>
+   The <filename>src/</filename> directory in xine-lib contains several
+   modules, this should give you a quick overview on where
+   to find what sources.
+  </para>
+  <para>
+   Directories marked with "(imported)" contain
+   code that is copied from an external project into xine-lib.
+   Everything below such a directory is up to this project. When modifying
+   code there, be sure to send the patches on. If some xine specific
+   adaptation of the code is absolutely necessary, a patch containing
+   the changes should be stored in Mercurial to not lose the changes the
+   next time we sync with the external project.
+  </para>
+  <para>
+   <variablelist>
+    <varlistentry>
+     <term><filename>audio_out</filename></term>
+     <listitem>
+      <para>
+       Audio output plugins. These provide a thin abstraction layer
+       around different types of audio output architectures or platforms.
+       Basically an audio output plugin provides functions to query and setup
+       the audio hardware and output audio data (e.g. PCM samples).
+      </para>
+      <para></para>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term><filename>demuxers</filename></term>
+     <listitem>
+      <para>
+       Demuxer plugins that handle various system layer file formats
+       like avi, asf or mpeg. The ideal demuxer know nothing about where the
+       data comes from and who decodes it. It should basically just unpack
+       it into chunks the rest of the engine can eat.
+      </para>
+      <para></para>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term><filename>dxr3</filename></term>
+     <listitem>
+      <para>
+       Code to support the DXR3 / hollywood+ hardware mpeg decoder.
+      </para>
+      <para></para>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term><filename>input</filename></term>
+     <listitem>
+      <para>
+       Input plugins encapsulate the origin of the data. Data sources like
+       ordinary files, DVDs, CDA or streaming media are handled here.
+      </para>
+      <para>
+       <variablelist>
+        <varlistentry>
+         <term><filename>dvb</filename></term>
+         <listitem>
+          <para>
+           Some headers for Digital Video Broadcast.
+          </para>
+          <para></para>
+         </listitem>
+        </varlistentry>
+        <varlistentry>
+         <term><filename>libdvdnav</filename> (imported)</term>
+         <listitem>
+          <para>
+           The libdvdnav library for DVD navigation is used
+           by xine's DVD input plugin.
+          </para>
+          <para></para>
+         </listitem>
+        </varlistentry>
+        <varlistentry>
+         <term><filename>libreal</filename>, <filename>librtsp</filename></term>
+         <listitem>
+          <para>
+           Support for RealMedia streaming as used by the RTSP input plugin.
+          </para>
+          <para></para>
+         </listitem>
+        </varlistentry>
+        <varlistentry>
+         <term><filename>vcd</filename></term>
+         <listitem>
+          <para>
+           The enhanced VCD input plugin which also handles VCD navigation.
+          </para>
+          <para>
+           <variablelist>
+            <varlistentry>
+             <term><filename>libcdio</filename>, <filename>libvcd</filename> \
(imported)</term> +             <listitem>
+              <para>
+               Libraries used by the enhanced VCD plugin.
+              </para>
+              <para></para>
+             </listitem>
+            </varlistentry>
+           </variablelist>
+          </para>
+          <para></para>
+         </listitem>
+        </varlistentry>
+       </variablelist>
+      </para>
+      <para></para>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term><filename>liba52</filename> (imported)</term>
+     <listitem>
+      <para>
+       A52 (aka AC3, aka Dolby Digital) audio decoder library and xine plugin.
+      </para>
[... 559 lines omitted ...]
+     </para>
+    </listitem>
+    <listitem> 
+     <para>
+      use something like
+      <programlisting>&nbsp;&nbsp;&nbsp;printf("module: \
..."[,...]);</programlisting> +      for console output. All console output goes to \
stdout and +      must be prefixed by the module name which generates the
+      output (see example above).
+     </para>
+    </listitem>
+    <listitem> 
+     <para>
+      Refer to emac's C-mode for all questions of proper indentiation.
+      That first of all means: indent with two spaces.
+     </para>
+    </listitem>
+   </itemizedlist>
+  </para>
+ </sect1>
+ 
+ <sect1>
+  <title>The xine logging system</title>
+  <para>
+   xine offers a wide range of possibilities to display
+   strings. This section should describe when to use
+   which way and how to do it right.
+  </para>
+  <sect2>
+   <title>xine_log</title>
+   <para>
+    Output which is done thru this function will be
+    displayed for the end user by the frontend.
+    If <varname>xine->verbosity</varname> is not 0 the messages will also
+    be displayed on the console. Ideally these strings
+    are translated.
+    This function is for information which the user should
+    read always.
+    <programlisting>&nbsp;&nbsp;&nbsp;xine_log(xine_t *xine, int buf, const char \
*format, ...);</programlisting> +    <varname>buf</varname> is either XINE_LOG_MSG \
for general messages or +    XINE_LOG_PLUGIN for messages about plugins.
+   </para>
+  </sect2>
+  <sect2>
+   <title>xprintf</title>
+   <para>
+    This macro uses the <varname>xine->verbosity</varname> value to decide
+    if the string should be printed to the console. Possible
+    values are XINE_VERBOSITY_NONE, XINE_VERBOSITY_LOG or
+    XINE_VERBOSITY_DEBUG. By default nothing is printed.
+    When you use xine-ui you can enable this output with
+    the <parameter>--verbose=[1,2]</parameter> options.
+    This function should be used for information which the
+    user should only read up on request.
+    <programlisting>&nbsp;&nbsp;&nbsp;xprintf(xine_t *xine, int verbosity, const \
char *format, ...);</programlisting> +   </para>
+  </sect2>
+  <sect2>
+   <title>lprintf/llprintf</title>
+   <para>
+    These macros are for debugging purpose only. Under normal
+    circumstances it is disabled. And can only be enabled by changing
+    a define statement and a recompilation. It has to be enabled for these
+    files that are of interest.
+    It should only be used for information which is intended for developers.
+    <programlisting>
+&nbsp;&nbsp;&nbsp;lprintf(const char *format, ...);
+&nbsp;&nbsp;&nbsp;llprintf(bool, const char *format, ...);</programlisting>
+    <varname>bool</varname> is a flag which enables or disables this logging.
+   </para>
+   <para>
+    <function>lprintf</function> can be enabled by defining LOG at the top of the \
source file. +    <function>llprintf</function> can be used for more than one \
categorie +    per file by using diffent lables:
+    <programlisting>
+&nbsp;&nbsp;&nbsp;#define LOG_LOAD 1
+&nbsp;&nbsp;&nbsp;#define LOG_SAVE 0
+&nbsp;&nbsp;&nbsp;
+&nbsp;&nbsp;&nbsp;llprintf(LOG_LOAD, "loading was successful\n");
+&nbsp;&nbsp;&nbsp;llprintf(LOG_SAVE, "could not save to file %s\n", \
filename);</programlisting> +   </para>
+   <para>
+    In this case only the first messages is printed. To enable/disable change the \
defines. +   </para>
+   <para>
+    LOG_MODULE should be used to set the modulename for xprintf/lprintf/llprintf.
+    Each output line will start with "modulename: ".
+    <programlisting>&nbsp;&nbsp;&nbsp;#define LOG_MODULE \
"modulename"</programlisting> +   </para>
+   <para>
+    LOG_VERBOSE can be defined to enable the logging of functionname and \
linenumbers. +    Then the output will be: "modulename: (function_name:42) message".
+   </para>
+  </sect2>
+  <sect2>
+   <title>_x_assert/_x_abort</title>
+   <para>
+    These are not purely logging functions, but despite their original C library \
versions, +    they always output debugging text, which is why usage of these \
functions is preferred. +   </para>
+   <para>
+    <function>_x_assert()</function> checks a condition and prints a note,
+    when the condition is false. In addition, a debug build and only a debug build \
will +    terminate the application, when the condition is false. Release versions \
will only +    print the note, but try to continue.
+   </para>
+   <para>
+    <function>_x_abort()</function> always terminates the application after printing \
a note. +   </para>
+  </sect2>
+ </sect1>
+
+ <sect1>
+  <title>How to contribute</title>
+  <para>
+   Make sure you send your patches in unified diff format to
+   the xine-devel mailing list. You'll have to subscribe first,
+   otherwise you're not allowed to post. Please do not send
+   patches to individual developers unless instructed otherwise
+   because your patch is more likely to get lost in an overfull
+   INBOX in that case. Please be patient, it may take 1-2 weeks
+   before you hear any comments on your work (developers may be
+   working on other parts of the code or are simply busy at
+   the moment).
+  </para>
+ </sect1>
+
+</chapter>
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 \
                doc/hackersguide/post_frame.svg
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/hackersguide/post_frame.svg	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,1564 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Creator: fig2dev Version 3.2 Patchlevel 5 -->
+<!-- CreationDate: Sat Jun  2 20:48:15 2007 -->
+<!-- Magnification: 1.050 -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="10.2in"
+   height="9.9in"
+   viewBox="-12 81 12214 11883"
+   id="svg4143"
+   sodipodi:version="0.32"
+   inkscape:version="0.45.1"
+   sodipodi:docname="post_frame.svg"
+   sodipodi:docbase="/home/flame/devel/repos/xine/xine-lib-1.2-newdocbook/doc/hackersguide"
 +   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <metadata
+     id="metadata4494">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs4492" />
+  <sodipodi:namedview
+     inkscape:window-height="611"
+     inkscape:window-width="722"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     guidetolerance="10.0"
+     gridtolerance="10.0"
+     objecttolerance="10.0"
+     borderopacity="1.0"
+     bordercolor="#666666"
+     pagecolor="#ffffff"
+     id="base"
+     inkscape:zoom="0.45679015"
+     inkscape:cx="459"
+     inkscape:cy="445.49997"
+     inkscape:window-x="552"
+     inkscape:window-y="25"
+     inkscape:current-layer="svg4143" />
+  <rect
+     style="fill:#ffffff;fill-opacity:1"
+     id="rect4496"
+     width="12700.504"
+     height="12145.769"
+     x="-201.72523"
+     y="-6.5896807" />
+  <g
+     style="stroke-width:.025in; stroke:black; fill:none"
+     id="g4145">
+<!-- Line -->    <polyline
+       points="3165,944 4110,944 4110,661 "
+       style="stroke:#000000;stroke-width:16; stroke-linejoin:miter; \
stroke-linecap:butt; " +       id="polyline4147" />
+<!-- Line: box -->    <rect
+       x="3165"
+       y="661"
+       width="6614"
+       height="9732"
+       rx="0"
+       style="stroke:#000000;stroke-width:16; stroke-linejoin:miter; \
stroke-linecap:butt; " +       id="rect4149" />
+<!-- Text -->    <text
+       xml:space="preserve"
+       x="3259"
+       y="850"
+       stroke="#000000"
+       fill="#000000"
+       font-family="Helvetica Narrow"
+       font-style="normal"
+       font-weight="normal"
+       font-size="139"
+       text-anchor="start"
+       id="text4151">post plugin</text>
+<!-- Line: box -->    <rect
+       x="1039"
+       y="1181"
+       width="1417"
+       height="425"
+       rx="0"
+       style="stroke:#000000;stroke-width:8; stroke-linejoin:miter; \
stroke-linecap:butt; " +       id="rect4153" />
+<!-- Text -->    <text
+       xml:space="preserve"
+       x="1228"
+       y="1464"
+       stroke="#000000"
+       fill="#000000"
+       font-family="Helvetica Narrow"
+       font-style="normal"
+       font-weight="normal"
+       font-size="139"
+       text-anchor="start"
+       id="text4155">get_frame</text>
+<!-- Line: box -->    <rect
+       x="1039"
+       y="2125"
+       width="1417"
+       height="1559"
+       rx="0"
+       style="stroke:#000000;stroke-width:8; stroke-linejoin:miter; \
stroke-linecap:butt; " +       id="rect4157" />
+<!-- Text -->    <text
+       xml:space="preserve"
+       x="1228"
+       y="2598"
+       stroke="#000000"
+       fill="#000000"
+       font-family="Helvetica Narrow"
+       font-style="normal"
+       font-weight="normal"
+       font-size="139"
[... 1312 lines omitted ...]
+         font-style="normal"
+         font-weight="normal"
+         font-size="189"
+         text-anchor="start"
+         id="text4467">dead-end draw</text>
+    </g>
+<!-- Line: box -->    <rect
+       x="236"
+       y="9543"
+       width="519"
+       height="850"
+       rx="0"
+       style="stroke:#000000;stroke-width:16; stroke-linejoin:miter; \
stroke-linecap:butt; " +       id="rect4469" />
+<!-- Text -->    <g
+       transform="translate(566,10299) rotate(-90.00021046)"
+       id="g4471">
+      <text
+         xml:space="preserve"
+         x="0"
+         y="0"
+         stroke="#000000"
+         fill="#000000"
+         font-family="Helvetica Narrow"
+         font-style="normal"
+         font-weight="normal"
+         font-size="189"
+         text-anchor="start"
+         id="text4473">freeing</text>
+    </g>
+<!-- Text -->    <text
+       xml:space="preserve"
+       x="4015"
+       y="6992"
+       stroke="#000000"
+       fill="#000000"
+       font-family="Helvetica"
+       font-style="normal"
+       font-weight="bold"
+       font-size="315"
+       text-anchor="start"
+       id="text4475">d u</text>
+<!-- Text -->    <text
+       xml:space="preserve"
+       x="425"
+       y="11811"
+       stroke="#000000"
+       fill="#000000"
+       font-family="Helvetica Narrow"
+       font-style="normal"
+       font-weight="normal"
+       font-size="189"
+       text-anchor="start"
+       id="text4477">frame</text>
+<!-- Text -->    <text
+       xml:space="preserve"
+       x="2078"
+       y="11811"
+       stroke="#000000"
+       fill="#000000"
+       font-family="Helvetica Narrow"
+       font-style="normal"
+       font-weight="normal"
+       font-size="189"
+       text-anchor="start"
+       id="text4479">frame-&gt;next</text>
+<!-- Text -->    <text
+       xml:space="preserve"
+       x="9118"
+       y="10960"
+       stroke="#000000"
+       fill="#000000"
+       font-family="Helvetica"
+       font-style="normal"
+       font-weight="bold"
+       font-size="315"
+       text-anchor="start"
+       id="text4481">d u</text>
+<!-- Text -->    <text
+       xml:space="preserve"
+       x="4015"
+       y="10015"
+       stroke="#000000"
+       fill="#000000"
+       font-family="Helvetica"
+       font-style="normal"
+       font-weight="bold"
+       font-size="315"
+       text-anchor="start"
+       id="text4483">d</text>
+<!-- Text -->    <text
+       xml:space="preserve"
+       x="8456"
+       y="10062"
+       stroke="#000000"
+       fill="#000000"
+       font-family="Helvetica"
+       font-style="normal"
+       font-weight="bold"
+       font-size="315"
+       text-anchor="start"
+       id="text4485">d</text>
+<!-- Text -->    <text
+       xml:space="preserve"
+       x="6000"
+       y="425"
+       stroke="#000000"
+       fill="#000000"
+       font-family="Helvetica Narrow"
+       font-style="normal"
+       font-weight="normal"
+       font-size="252"
+       text-anchor="start"
+       id="text4487">up</text>
+<!-- Text -->    <text
+       xml:space="preserve"
+       x="6614"
+       y="425"
+       stroke="#000000"
+       fill="#000000"
+       font-family="Helvetica Narrow"
+       font-style="normal"
+       font-weight="normal"
+       font-size="252"
+       text-anchor="start"
+       id="text4489">down</text>
+  </g>
+</svg>
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 \
                doc/hackersguide/stream.docbook
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/hackersguide/stream.docbook	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,656 @@
+<chapter id="stream">
+ <title>xine's stream layer</title>
+ 
+ <sect1>
+  <title>Input layer</title>
+  <para>
+   Many media players expect streams to be stored within files on
+   some local medium. In actual fact, media may be streamed over a 
+   network (e.g. via HTTP or RTP), encoded onto a specialized medium
+   (e.g. DVD), etc. To allow you to access all this media, xine supports
+   the concept of an "input plugin". The tasks performed by an
+   input plugin are:
+   <itemizedlist>
+    <listitem>
+     <para>
+      Validation of Media Resource Locators (MRLs).
+     </para>
+    </listitem>
+    <listitem>
+     <para>
+      MRL specific session management (e.g. opening and closing local files).
+     </para>
+    </listitem>
+    <listitem>
+     <para>
+      Reading blocks/specific numbers of bytes from the input device.
+     </para>
+    </listitem>
+   </itemizedlist>
+  </para>
+  <para>
+   In addition to these tasks, the input plugin may keep track of some
+   input device-specific state information (e.g. a DVD plugin may keep
+   track of navigational state data such as current title/chapter).
+  </para>
+  <para>
+   There are two classes of input device which xine recognizes.
+   Byte-oriented devices can, upon request, return an arbitary
+   non-zero number of bytes from a stream. Examples of such devices
+   are files or network streams. Block-oriented devices, however, have
+   a prefered block or "frame"-size. An example of such a device is
+   a DVD where data is stored in logical blocks of 2048 bytes. One may
+   pass the hint to xine that the plugin is block-oriented by setting the
+   INPUT_CAP_BLOCK capability. Note that this is only a hint and
+   xine does not guarantee that all requests to the plugin will
+   be purely block based.
+  </para>
+  <sect2>
+   <title>Writing a xine input plugin</title>
+   <para>
+    An input plugin provides API functions which allow the engine to
+    access the data source the plugin encapsulates. The input plugin API
+    is declared in <filename>input/input_plugin.h</filename>.
+   </para>
+   <para>
+    An input plugin exports a public function of the form:
+    <programlisting>&nbsp;&nbsp;&nbsp;void *input_init_plugin(xine_t *xine, void \
*data);</programlisting> +    This function initializes an input plugin class object \
with the +    following functions:
+   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;char *get_description(input_class_t \
*this_gen);</programlisting> +    This function returns a plaintext, one-line string \
describing the plugin. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;char *get_identifier(input_class_t \
*this_gen);</programlisting> +    This function returns a shorter identifier \
describing the plugin. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;xine_mrl_t **get_dir(input_class_t *this_gen, \
const char *filename, int *nFiles);</programlisting> +    Retrieves a directory \
listing from the plugin. This function is optional. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;char **get_autoplay_list(input_class_t \
*this_gen, int *num_files);</programlisting> +    Retrieves the autoplay playlist \
from the plugin. This function is optional. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;int eject_media(input_class_t \
*this_gen);</programlisting> +    Ejects the medium. This function is optional.
+   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;void dispose(input_class_t \
*this_gen);</programlisting> +    This function frees the memory used by the input \
plugin class object. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;input_plugin_t *get_instance(input_class_t \
*class_gen, xine_stream_t *stream, const char *mrl);</programlisting> +    The plugin \
should try, if it can handle the specified MRL and return an +    instance of itself \
if so. If not, NULL should be returned. When a new MRL +    is to be played, xine \
engine asks all the available input plugins one by +    one if they can handle the \
MRL. +    Note that input plugins are not guaranteed to be queried
+    in any particular order and the first input plugin to claim an MRL
+    gets control so try not to duplicate MRLs already found within xine.
+   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;int open(input_plugin_t \
*this_gen);</programlisting> +    You should do any device-specific initialisation \
within this function. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;uint32_t get_capabilities(input_plugin_t \
*this_gen);</programlisting> +    Returns a bit mask describing the input device's \
capabilities. +    You may logically OR the <varname>INPUT_CAP_*</varname> constants \
together to get +    a suitable bit-mask (via the '|' operator).
+   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;off_t read(input_plugin_t *this_gen, char \
*buf, off_t nlen);</programlisting> +    Reads a specified number of bytes into a \
buffer and returns the number of bytes actually copied. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;buf_element_t *read_block(input_plugin_t \
*this_gen, fifo_buffer_t *fifo, off_t len);</programlisting> +    Should the input \
plugin set the block-oriented hint and if the +    demuxer supports it, this function \
will be called to read a block directly +    into a xine buffer from the buffer pool.
+   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;off_t seek(input_plugin_t *this_gen, off_t \
offset, int origin);</programlisting> +    This function is called by xine when it is \
required that subsequent +    reads come from another part of the stream.
+   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;off_t get_current_pos(input_plugin_t \
*this_gen);</programlisting> +    Returns the current position within a finite length \
stream. +   </para>
+   <para>
[... 404 lines omitted ...]
+   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;char *get_identifier(video_decoder_class_t \
*this);</programlisting> +    <programlisting>&nbsp;&nbsp;&nbsp;char \
*get_identifier(audio_decoder_class_t *this);</programlisting> +    This function \
returns a brief character string identifying the plugin. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;char *get_description(video_decoder_class_t \
*this);</programlisting> +    <programlisting>&nbsp;&nbsp;&nbsp;char \
*get_description(audio_decoder_class_t *this);</programlisting> +    This function \
returns a slightly longer description of the plugin. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;void dispose_class(video_decoder_class_t \
*this);</programlisting> +    <programlisting>&nbsp;&nbsp;&nbsp;void \
dispose_class(audio_decoder_class_t *this);</programlisting> +    This function frees \
the resources allocated by the plugin class. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;video_decoder_t \
*open_plugin(video_decoder_class_t *class_gen, xine_stream_t \
*stream);</programlisting> +    <programlisting>&nbsp;&nbsp;&nbsp;audio_decoder_t \
*open_plugin(audio_decoder_class_t *class_gen, xine_stream_t \
*stream);</programlisting> +    This function initializes the decoder plugin's \
private state. It also +    initializes and returns either an audio_decoder_t or a \
video_decoder_t for +    the engine. The decoder_t contains a number of functions \
that the plugin +    invokes to handle data decoding. These functions include:
+   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;void decode_data(video_decoder_t *this_gen, \
buf_element_t *buf);</programlisting> +    <programlisting>&nbsp;&nbsp;&nbsp;void \
decode_data(audio_decoder_t *this_gen, buf_element_t *buf);</programlisting> +    \
This function performs the bulk of the decoding work. The xine engine +    delivers \
buffers (xine_buffer_t data types) to this function and it is up +    to this \
function to assemble the parts of the buffer, decode the data, and +    send the \
decoded data to the proper output unit. The constraint is that +    you must never \
call a port function of the output port when the port has +    not been opened by \
you. (See the <function>open()</function> and +    <function>close()</function> \
functions of <type>xine_video_port_t</type> +    and <type>xine_audio_port_t</type>.)
+   </para>
+   <para>
+    A buffer has a <varname>decoder_flags</varname> field which can have
+    a number of flags set. The first buffer that a decoder receives ought
+    to have the BUF_FLAG_HEADER flag set. This indicates that the buffer
+    content contains the essential setup information for decoding
+    (width, height, etc. for video; sample rate, channels, etc. for audio).
+   </para>
+   <para>
+    If the BUF_FLAG_HEADER flag is not set, the content of the buffer should
+    be accumulated in a private buffer until a buffer with a
+    BUF_FLAG_FRAME_END flag is set. This indicates that the entire chunk has
+    been transmitted to the decoder and is ready to be decoded. Fetch either
+    an empty video frame or audio buffer from the appropriate output unit. Perform
+    the appropriate decoding operations and set the pts for the output buffer
+    (and the duration, a.k.a. video_step, for video). Dispatch the decoded
+    data to the output and reset the internal buffer accumulation accounting.
+   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;void flush(video_decoder_t \
*this_gen);</programlisting> +    <programlisting>&nbsp;&nbsp;&nbsp;void \
flush(audio_decoder_t *this_gen);</programlisting> +    This function is called when \
either the xine engine flushes the stream, e.g., +    after a seek operation or when \
decoding runs too slow and frames arrive in +    the output loops fast enough. \
Decoders should release everything they have +    already decoded, drop the rest and \
wait for new input. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;void reset(video_decoder_t \
*this_gen);</programlisting> +    <programlisting>&nbsp;&nbsp;&nbsp;void \
reset(audio_decoder_t *this_gen);</programlisting> +    This function is called when \
the xine engine resets the stream. +    Decoders should get ready to receive data \
that has nothing to do +    with the one it worked on up to now.
+   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;void discontinuity(video_decoder_t \
*this_gen);</programlisting> +    <programlisting>&nbsp;&nbsp;&nbsp;void \
discontinuity(audio_decoder_t *this_gen);</programlisting> +    This function is \
called when the xine engine encounters a pts +    discontinuity. Decoders should \
forget all timestamping information +    they might have accumulated from the stream \
to not confuse metronom. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;void dispose(video_decoder_t \
*this_gen);</programlisting> +    <programlisting>&nbsp;&nbsp;&nbsp;void \
dispose(audio_decoder_t *this_gen);</programlisting> +    This function frees the \
resources used by the decoder plugin. +   </para>
+  </sect2>
+  <sect2>
+   <title>SPU decoder</title>
+   <para>
+    A lot written above also applies for subpicture unit (SPU) decoders. The
+    SPU decoder API is declared in \
<filename>src/xine-engine/spu_decoder.h</filename>. +    Details on the data, SPU \
decoders are expected to output, see the section on +    <link linkend="osd">overlays \
and OSD</link>. +   </para>
+   <para>
+    However, there are some differences to consider. At first, unlike audio and
+    video, subtitles do not form a continuous stream. The decoder will therefore
+    only be called once in a while. The metronom call for timestamping,
+    which for audio and video is done by the engine, has to be done manually for \
SPU: +    <programlisting>&nbsp;&nbsp;&nbsp;vpts = metronom->got_spu_packet(metronom, \
buf->pts);</programlisting> +   </para>
+   <para>
+    Another difference is that while both audio and video decoders are automatically
+    blocked in their \
<function>get_buffer()</function>/<function>get_frame()</function> +    methods when \
the output cannot take any more data, this does not work for SPU, +    because it \
could take minutes before the next free slot becomes available and we must not +    \
block the decoder thread for that long since it might be shared with a video decoder. \
+    But when a SPU decoder does not share the thread and we let it run without any + \
blocking, it will overflow the available overlay slots very soon. Since SPU +    \
decoders should not have to know, whether they share the thread or not, a helper +    \
function <function>_x_spu_decoder_sleep()</function> is provided, which, when told +  \
the timestamp of the next overlay, will wait long enough to not overflow the +    \
overlay slots, but short enough to not hinder a video decoder in the same thread. +   \
</para> +   <para>
+    There are also two functions in the SPU decoder API, which have not been \
discussed above: +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;int get_interact_info(spu_decoder_t *this_gen, \
void *data);</programlisting> +    Since SPUs are sometimes (on DVDs for example) \
used for user interaction like menu +    highlights, this function can be called to \
get <varname>data</varname> filled with +    the current interaction information. The \
caller and the decoder have to agree on +    what this is exactly. With DVDs, you can \
get a copy of the current NAV packet here. +   </para>
+   <para>
+    <programlisting>&nbsp;&nbsp;&nbsp;void set_button(spu_decoder_t *this_gen, \
int32_t button, int32_t mode);</programlisting> +    Also for interaction, you can \
ask the decoder here to change the +    current highlighting.
+   </para>
+  </sect2>
+ </sect1>
+
+</chapter>
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 include/config.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/config.h	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2007 the xine project
+ *
+ * This file is part of xine, a free video player.
+ *
+ * xine is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public Licence as published by the Free
+ * Software Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * xine 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 Licence for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public Licence along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
+ *
+ */
+
+#include "configure.h"
+#include "os_internal.h"
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 lib/memmem.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/memmem.c	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,49 @@
+/* Copyright (C) 1991,92,93,94,96,97,98,2000,2004,2007 Free Software Foundation, \
Inc. +   This file is part of the GNU C Library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License along
+   with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#include "config.h"
+
+#include <stddef.h>
+#include <string.h>
+
+/* Return the first occurrence of NEEDLE in HAYSTACK.  */
+void *xine_internal_memmem (const void *haystack, size_t haystack_len,
+	      const void *needle, size_t needle_len)
+{
+  const char *begin;
+  const char *const last_possible
+    = (const char *) haystack + haystack_len - needle_len;
+
+  if (needle_len == 0)
+    /* The first occurrence of the empty string is deemed to occur at
+       the beginning of the string.  */
+    return (void *) haystack;
+
+  /* Sanity check, otherwise the loop might search through the whole
+     memory.  */
+  if (haystack_len < needle_len)
+    return NULL;
+
+  for (begin = (const char *) haystack; begin <= last_possible; ++begin)
+    if (begin[0] == ((const char *) needle)[0] &&
+	!memcmp ((const void *) &begin[1],
+		 (const void *) ((const char *) needle + 1),
+		 needle_len - 1))
+      return (void *) begin;
+
+  return NULL;
+}
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 lib/timedlock.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/timedlock.c	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,33 @@
+#include "config.h"
+
+#include <errno.h>
+
+#define _x_min(a, b) ((a) < (b) ? (a) : (b))
+
+int xine_private_pthread_mutex_timedlock(pthread_mutex_t *mutex,
+                                         const struct timespec *abs_timeout)
+{
+    int             pthread_rc;
+    struct timespec remaining, slept, ts;
+
+    remaining = *abs_timeout;
+    while ((pthread_rc = pthread_mutex_trylock(mutex)) == EBUSY) {
+        ts.tv_sec  = 0;
+        ts.tv_nsec = (remaining.tv_sec > 0 ? 10000000
+                                           : _x_min(remaining.tv_nsec, 10000000));
+        nanosleep(&ts, &slept);
+        ts.tv_nsec -= slept.tv_nsec;
+        if (ts.tv_nsec <= remaining.tv_nsec) {
+            remaining.tv_nsec -= ts.tv_nsec;
+        }
+        else {
+            remaining.tv_sec--;
+            remaining.tv_nsec = (1000000 - (ts.tv_nsec - remaining.tv_nsec));
+        }
+        if (remaining.tv_sec < 0 || (!remaining.tv_sec && remaining.tv_nsec <= 0)) {
+            return ETIMEDOUT;
+        }
+    }
+
+    return pthread_rc;
+}
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/audio_out.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/audio_out.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,220 @@
+dnl -----------------
+dnl Audio out plugins
+dnl -----------------
+AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [
+    dnl Setup defaults for the target operating system.  For example, alsa is
+    dnl only ever available on Linux, so don't bother checking for it unless
+    dnl explicitly requested to do so on other operating systems.
+    dnl Notes:
+    dnl - Alsa is Linux only
+    dnl - CoreAudio is Mac OS X only
+    dnl - EsounD is reported to be available on most platforms
+    dnl - FusionSound is Linux only, but don't enable it by default
+    dnl - Jack is Linux and Mac OS X primarily
+    dnl - OSS is most unix variants
+    dnl - PulseAudio has been tested on Linux, Solaris, FreeBSD, Windows
+    dnl - SunAudio is NetBSD, OpenBSD, Solaris (anything else?)
+
+    default_enable_coreaudio=disable
+    default_enable_irixal=disable
+    default_enable_oss=enable
+    default_enable_sunaudio=disable
+
+    default_with_alsa=without
+    default_with_esound=with
+    default_with_fusionsound=without
+    default_with_jack=without
+    default_with_pulseaudio=without
+
+    case "$host_os" in
+        cygwin* | mingw*)
+            default_enable_oss=disable
+            default_with_pulseaudio=with
+            ;;
+        darwin*)
+            default_enable_coreaudio=enable
+            default_with_jack=with
+            default_enable_oss=disable
+            ;;
+        freebsd*)
+            default_with_pulseaudio=with
+            ;;
+        irix*)
+            default_enable_irixal=enable
+            default_enable_oss=disable
+            ;;
+        linux*)
+            default_with_alsa=with
+            default_with_jack=with
+            default_with_pulseaudio=with
+            ;;
+        netbsd*)
+            default_enable_sunaudio=enable
+            ;;
+        openbsd*)
+            default_enable_sunaudio=enable
+            ;;
+        solaris*)
+            default_with_pulseaudio=with
+            default_enable_sunaudio=enable
+            ;;
+    esac
+
+
+    dnl Alsa support
+    AC_ARG_WITH([alsa],
+                [AS_HELP_STRING([--with-alsa], [Build with ALSA audio output \
support])], +                [test x"$withval" != x"no" && with_alsa="yes"],
+                [test $default_with_alsa = without && with_alsa="no"])
+    if test x"$with_alsa" != x"no"; then
+        PKG_CHECK_MODULES([ALSA], [alsa >= 0.9.0], [have_alsa=yes], [have_alsa=no])
+        if test x"$with_alsa" = x"yes" && test x"$have_alsa" != x"yes"; then
+            AC_MSG_ERROR([ALSA support requested but not found.])
+        elif test x"$have_alsa" = x"yes"; then
+            dnl This is needed by src/input/input_v4l.c
+            AC_DEFINE([HAVE_ALSA], 1, [Define this if you have ALSA installed])
+        fi
+    fi
+    AM_CONDITIONAL([ENABLE_ALSA], [test x"$have_alsa" = x"yes"])
+
+
+    dnl CoreAudio for Mac OS X
+    AC_ARG_ENABLE([coreaudio],
+                  [AS_HELP_STRING([--enable-coreaudio], [Enable support for Mac OS X \
CoreAudio])], +                  [test x"$enableval" != x"no" && \
enable_coreaudio="yes"], +                  [test $default_enable_coreaudio = disable \
&& enable_coreaudio="no"]) +    if test x"$enable_coreaudio" != x"no"; then
+        AC_MSG_CHECKING([for CoreAudio frameworks])
+        ac_save_LIBS="$LIBS" LIBS="$LIBS -framework CoreAudio -framework AudioUnit"
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[return 0]])], [have_coreaudio=yes], \
[have_coreaudio=no]) +        LIBS="$ac_save_LIBS"
+        AC_MSG_RESULT([$have_coreaudio])
+        if test x"$enable_coreaudio" = x"yes" && test x"$have_coreaudio" != x"yes"; \
then +            AC_MSG_ERROR([CoreAudio support requested, but CoreAudio not \
found]) +        fi
+    fi
+    AM_CONDITIONAL([ENABLE_COREAUDIO], [test x"$have_coreaudio" = x"yes"])
+
+
+    dnl EsounD support
+    AC_ARG_WITH([esound],
+                [AS_HELP_STRING([--with-esound], [Build with EsounD audio output \
support])], +                [test x"$withval" != x"no" && with_esound="yes"],
+                [test $default_with_esound = without && with_esound="no"])
+    if test x"$with_esound" != x"no"; then
+        PKG_CHECK_MODULES([ESD], [esound], [have_esound=yes], [have_esound=no])
+        if test x"$with_esound" = x"yes" && test x"$have_esound" != x"yes"; then
+            AC_MSG_ERROR([EsounD support requested, but EsounD not found])
+        fi
+    fi
+    AM_CONDITIONAL([ENABLE_ESD], [test x"$have_esound" = x"yes"])
+
+
+    dnl FusionSound support
+    AC_ARG_WITH([fusionsound],
+                [AS_HELP_STRING([--with-fusionsound], [Build with FunsionSound audio \
output support])], +                [test x"$withval" != x"no" && \
with_fusionsound="yes"], +                [test $default_with_fusionsound = without \
&& with_fusionsound="no"]) +    if test x"$with_fusionsound" != x"no"; then
+        PKG_CHECK_MODULES([FUSIONSOUND], [fusionsound >= 0.9.23], \
[have_fusionsound=yes], [have_fusionsound=no]) +        if test x"$with_fusionsound" \
= x"yes" && test x"$have_fusionsound" != x"yes"; then +            \
AC_MSG_ERROR([FusionSound support requested, but FusionSound not found]) +        fi
+    fi
+    AM_CONDITIONAL([ENABLE_FUSIONSOUND], [test x"$have_fusionsound" = x"yes"])
+
+
+    dnl IRIX style audio interface
+    AC_ARG_ENABLE([irixal],
+                  [AS_HELP_STRING([--enable-irixal], [Enable support for IRIX \
libaudio])], +                  [test x"$enableval" != x"no" && enable_irixal="yes"],
+                  [test $default_enable_irixal = disable && enable_irixal="no"])
+    if test x"$enable_irixal" != x"no"; then
+        AC_CACHE_CHECK([for IRIX libaudio support], [am_cv_have_irixal],
+                       [AC_CHECK_HEADER([dmedia/audio.h],
+                       [am_cv_have_irixal=yes], [am_cv_have_irixal=no])])
+        if test x"$am_cv_have_irixal" = x"yes"; then
+            AC_DEFINE([HAVE_IRIXAL], 1, [Define this if you have a usable IRIX al \
interface available]) +            IRIXAL_LIBS="-laudio"
+            IRIXAL_STATIC_LIB="/usr/lib/libaudio.a"
+            AC_SUBST(IRIXAL_LIBS)
+            AC_SUBST(IRIXAL_STATIC_LIB)
+        fi
+    fi
+    AM_CONDITIONAL([ENABLE_IRIXAL], [test x"$am_cv_have_irixal" = x"yes"])
+
+
+    dnl JACK support
+    AC_ARG_WITH([jack],
+                [AS_HELP_STRING([--with-jack], [Build with Jack support])],
+                [test x"$withval" != x"no" && with_jack="yes"],
+                [test $default_with_jack = without && with_jack="no"])
+    if test x"$with_jack" != x"no"; then
+        PKG_CHECK_MODULES([JACK], [jack >= 0.100], [have_jack=yes], [have_jack=no])
+        if test x"$with_jack" = x"yes" && test x"$have_jack" != x"yes"; then
+            AC_MSG_ERROR([Jack support requested, but Jack not found])
+        fi
+    fi
+    AM_CONDITIONAL([ENABLE_JACK], [test x"$have_jack" = x"yes"])
+
+
+    dnl OSS (Open Sound System)
+    AC_ARG_ENABLE([oss],
+                  [AS_HELP_STRING([--enable-oss], [Enable OSS (Open Sound System) \
support])], +                  [test x"$enableval" != x"no" && enable_oss="yes"],
+                  [test $default_enable_oss = disable && enable_oss="no"])
+    if test x"$enable_oss" != x"no"; then
+        AC_CHECK_HEADERS([sys/soundcard.h machine/soundcard.h soundcard.h], [break])
+        AC_CHECK_DECL([SNDCTL_DSP_SETFRAGMENT], [have_oss=yes], [have_oss=no],
+                      [#ifdef HAVE_SYS_SOUNDCARD_H
+                       # include <sys/soundcard.h>
+                       #endif
+                       #ifdef HAVE_MACHINE_SOUNDCARD_H
+                       # include <sys/soundcard.h>
+                       #endif
+                       #ifdef HAVE_SOUNDCARD_H
+                       # include <soundcard.h>
+                       #endif])
+        if test x"$enable_oss" = x"yes" && test x"$have_oss" != x"yes"; then
+            AC_MSG_ERROR([OSS support requested, but OSS not found])
+        fi
+    fi
+    AM_CONDITIONAL([ENABLE_OSS], [test x"$have_oss" = x"yes"])
+
+
+    dnl PulseAudio
+    AC_ARG_WITH([pulseaudio],
+                [AS_HELP_STRING([--with-pulseaudio], [Build with PulseAudio \
support])], +                [test x"$withval" != x"no" && with_pulseaudio="yes"],
+                [test $default_with_pulseaudio = without && with_pulseaudio="no"])
+    if test x"$with_pulseaudio" != x"no"; then
+        PKG_CHECK_MODULES([PULSEAUDIO], [libpulse], [have_pulseaudio="yes"], \
[have_pulseaudio="no"]) +        if test x"$with_pulseaudio" = x"yes" && test \
x"$have_pulseaudio" != x"yes"; then +            AC_MSG_ERROR([PulseAudio support \
requested, but PulseAudio not found]) +        fi
+    fi
+    AM_CONDITIONAL([ENABLE_PULSEAUDIO], [test x"$have_pulseaudio" = x"yes"])
+
+
+    dnl SUN style audio interface
+    AC_ARG_ENABLE([sunaudio],
+                  [AS_HELP_STRING([--enable-sunaudio], [Enable Sun audio support])],
+                  [test x"$enableval" != x"no" && enable_sunaudio="yes"],
+                  [test $default_enable_sunaudio = disable && enable_sunaudio="no"])
+    if test x"$enable_sunaudio" != x"no"; then
+        AC_MSG_CHECKING([for Sun audio support])
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+                                             #include <sys/audioio.h>]],
+                                           [[audio_info_t audio_info; \
AUDIO_INITINFO(&audio_info)]])], +                          [have_sunaudio=yes], \
[have_sunaudio=no]) +        AC_MSG_RESULT([$have_sunaudio])
+        if test x"$enable_sunaudio" = x"yes" && test x"$have_sunaudio" != x"yes"; \
then +            AC_MSG_ERROR([Sun audio support requested, but Sun audio not \
found]) +        elif test x"$have_sunaudio" = x"yes"; then
+           dnl NetBSD and OpenBSD don't have this, but check for it
+           dnl rather than assuming that it doesn't happen elsewhere.
+           AC_CHECK_MEMBERS([audio_info_t.output_muted])
+        fi
+    fi
+    AM_CONDITIONAL([ENABLE_SUNAUDIO], [test x"$have_sunaudio" = x"yes"])
+])dnl XINE_AUDIO_OUT_PLUGINS
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/decoders.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/decoders.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,507 @@
+dnl ---------------------------
+dnl Decoder and Demuxer Plugins
+dnl ---------------------------
+AC_DEFUN([XINE_DECODER_PLUGINS], [
+    dnl a52dec (optional; enabled by default; external version allowed)
+    AC_ARG_ENABLE([a52dec],
+                  [AS_HELP_STRING([--enable-a52dec], [Enable support for a52dec \
decoding library (default: enabled)])], +                  [test x"$enableval" != \
x"no" && enable_a52dec="yes"]) +    AC_ARG_WITH([external-a52dec],
+                [AS_HELP_STRING([--with-external-a52dec], [Use external a52dec \
library (not recommended)])], +                [test x"$withval" != x"no" && \
with_external_a52dec="yes"], [with_external_a52dec="no"]) +    if test \
x"$enable_a52dec" != x"no"; then +        if test x"$with_external_a52dec" != x"no"; \
then +            AC_CHECK_LIB([a52], [a52_init],
+                         [AC_CHECK_HEADERS([a52dec/a52.h a52dec/a52_internal.h], \
[have_external_a52dec=yes], [have_external_a52dec=no], +                              \
[#ifdef HAVE_SYS_TYPES_H +                                            # include \
<sys/types.h> +                                            #endif
+                                            #ifdef HAVE_INTTYPES_H
+                                            # include <inttypes.h>
+                                            #endif
+                                            #ifdef HAVE_STDINT_H
+                                            # include <stdint.h>
+                                            #endif
+                                            #include <a52dec/a52.h>])], \
[have_external_a52dec=no], [-lm]) +            if test x"$have_external_a52dec" = \
x"no"; then +                AC_MSG_RESULT([*** no usable version of a52dec found, \
using internal copy ***]) +            fi
+        else
+            AC_MSG_RESULT([Using included a52dec support])
+        fi
+        if test x"$have_external_a52dec" = x"yes"; then
+            A52DEC_CFLAGS=''
+            A52DEC_LIBS='-la52'
+            A52DEC_DEPS=''
+	else
+            A52DEC_CFLAGS='-I$(top_srcdir)/contrib/a52dec'
+            A52DEC_LIBS='$(top_builddir)/contrib/a52dec/liba52.la'
+            A52DEC_DEPS='$(top_builddir)/contrib/a52dec/liba52.la'
+        fi
+        AC_SUBST(A52DEC_CFLAGS)
+        AC_SUBST(A52DEC_DEPS)
+        AC_SUBST(A52DEC_LIBS)
+    fi
+    AM_CONDITIONAL([ENABLE_A52DEC], [test x"$enable_a52dec" != x"no"])
+    AM_CONDITIONAL([WITH_EXTERNAL_A52DEC], [test x"$have_external_a52dec" = x"yes"])
+
+
+    dnl ASF (optional; enabled by default)
+    AC_ARG_ENABLE([asf],
+                  [AS_HELP_STRING([--enable-asf], [Enable support for ASF demuxer \
(default: enabled)])], +                  [test x"$enableval" != x"no" && \
enable_asf="yes"]) +    AM_CONDITIONAL([ENABLE_ASF], [test x"$enable_asf" != x"no"])
+
+
+    dnl FAAD (optional; enabled by default)
+    AC_ARG_ENABLE([faad],
+                  [AS_HELP_STRING([--enable-faad], [Enable support for FAAD decoder \
(default: enabled)])], +                  [test x"$enableval" != x"no" && \
enable_faad="yes"]) +    AM_CONDITIONAL([ENABLE_FAAD], [test x"$enable_faad" != \
x"no"]) +
+
+    dnl ffmpeg (required; external version allowed)
+    AC_ARG_WITH([external-ffmpeg],
+                [AS_HELP_STRING([--with-external-ffmpeg], [use external ffmpeg \
library])], +                [], [with_external_ffmpeg="no"])
+    AC_ARG_ENABLE([ffmpeg_uncommon_codecs],
+                  [AS_HELP_STRING([--disable-ffmpeg-uncommon-codecs], [don't build \
uncommon ffmpeg codecs])], +                  [test x"$enableval" != x"no" && \
enable_ffmpeg_uncommon_codecs="yes"]) +    AC_ARG_ENABLE([ffmpeg_popular_codecs],
+                  [AS_HELP_STRING([--disable-ffmpeg-popular-codecs], [don't build \
popular ffmpeg codecs])], +                  [test x"$enableval" != x"no" && \
enable_ffmpeg_popular_codecs="yes"]) +    case x"$with_external_ffmpeg" in
+        x"no") with_external_ffmpeg=no ;;
+        x"soft")
+            PKG_CHECK_MODULES([FFMPEG], [libavcodec >= 51.20.0], \
[with_external_ffmpeg=yes], [with_external_ffmpeg=no]) +            ;;
+        x*)
+            PKG_CHECK_MODULES([FFMPEG], [libavcodec >= 51.20.0], \
[with_external_ffmpeg=yes]) +            ;;
+    esac
+    if test x"$with_external_ffmpeg" != x"no"; then
+        PKG_CHECK_MODULES([FFMPEG_POSTPROC], [libpostproc])
+        AC_DEFINE([HAVE_FFMPEG], 1, [Define this if you have ffmpeg library])
+   
+        AC_MSG_NOTICE([
+*********************************************************************
+xine-lib is configured with external ffmpeg.
+
+This requires the same version of ffmpeg what is included in xine and
+you should know what you do. If some problems occur, please try to
+use internal ffmpeg.
+*********************************************************************])
+    else
+        AC_MSG_RESULT([Using included ffmpeg])
+    fi
+    AM_CONDITIONAL([FFMPEG_DISABLE_UNCOMMON_CODECS], [test \
x"$enable_ffmpeg_uncommon_codecs" = x"no"]) +    \
AM_CONDITIONAL([FFMPEG_DISABLE_POPULAR_CODECS], [test \
x"$enable_ffmpeg_popular_codecs" = x"no"]) +    \
AM_CONDITIONAL([WITH_EXTERNAL_FFMPEG], [test x"$with_external_ffmpeg" != x"no"]) +
+
+    dnl gdk-pixbuf (optional; enabled by default)
+    AC_ARG_ENABLE([gdkpixbuf],
+                  [AS_HELP_STRING([--enable-gdkpixbuf], [Enable GdkPixbuf support \
(default: enabled)])], +                  [test x"$enableval" != x"no" && \
enable_gdkpixbuf="yes"]) +    if test x"$enable_gdkpixbuf" != x"no"; then
+        PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0], [have_gdkpixbuf=yes], \
[have_gdkpixbuf=no]) +        if test x"$enable_gdkpixbuf" = x"yes" && test \
x"$have_gdkpixbuf" != x"yes"; then +            AC_MSG_ERROR([GdkPixbuf support \
requested, but GdkPixbuf not found]) +        fi
+    fi
+    AM_CONDITIONAL([ENABLE_GDK_PIXBUF], [test x"$have_gdkpixbuf" = x"yes"])
+
+
+    dnl ImageMagick (optional; enabled by default)
+    AC_ARG_WITH([imagemagick],
+                [AS_HELP_STRING([--with-imagemagick], [Enable ImageMagick image \
decoder support (default: enabled)])], +                [test x"$withval" != x"no" && \
with_imagemagick="yes"]) +    if test x"$with_imagemagick" != x"no"; then
+        PKG_CHECK_MODULES([WAND], [Wand], [have_imagemagick=yes], \
[have_imagemagick=no]) +        if test x"$with_imagemagick" = x"yes" && test \
x"$have_imagemagick" = x"no"; then +            AC_MSG_ERROR([ImageMagick support \
requested, but ImageMagick not found]) +        fi
+    fi
[... 255 lines omitted ...]
+        elif test x"$have_mng" = x"yes"; then
+            MNG_LIBS="-lmng"
+            AC_SUBST(MNG_LIBS)
+        fi
+    fi
+    AM_CONDITIONAL([ENABLE_MNG], [test x"$have_mng" = x"yes"])
+
+
+    dnl Ogg/Speex (optional; enabled by default; external)
+    AC_ARG_WITH([speex],
+                [AS_HELP_STRING([--with-speex], [Enable Speex audio decoder support \
(default: enabled)])], +                [test x"$withval" != x"no" && \
with_speex="yes"]) +    if test x"$with_speex" != x"no"; then
+        PKG_CHECK_MODULES([SPEEX], [ogg speex], [have_speex=yes], [have_speex=no])
+        if test x"$with_speex" = x"yes" && test x"$have_speex" != x"yes"; then
+            AC_MSG_ERROR([Speex support requested, but libspeex not found])
+        elif test x"$have_speex" = x"yes"; then
+            AC_DEFINE([HAVE_SPEEX], 1, [Define this if you have speex])
+        fi
+    fi
+    AM_CONDITIONAL([ENABLE_SPEEX], [test x"$have_speex" = x"yes"])
+
+
+    dnl Ogg/Theora (optional; enabled by default; external)
+    AC_ARG_WITH([theora],
+                [AS_HELP_STRING([--with-theora], [Enable Theora video decoder \
support (default: enabled)])], +                [test x"$withval" != x"no" && \
with_theora="yes"]) +    if test x"$with_theora" != x"no"; then
+        PKG_CHECK_MODULES([THEORA], [ogg theora], [have_theora=yes], \
[have_theora=no]) +        if test x"$with_theora" = x"yes" && test x"$have_theora" = \
x"no"; then +            AC_MSG_ERROR([Theora support requested, but libtheora not \
found]) +        elif test x"$have_theora" = x"yes"; then
+            AC_DEFINE([HAVE_THEORA], 1, [Define this if you have theora])
+        fi
+    fi
+    AM_CONDITIONAL([ENABLE_THEORA], [test x"$have_theora" = x"yes"])
+
+
+    dnl Ogg/Vorbis (optional; enabled by default; external)
+    AC_ARG_WITH([vorbis],
+                [AS_HELP_STRING([--with-vorbis], [Enable Vorbis audio decoder \
support (default: enabled)])], +                [test x"$withval" != x"no" && \
with_vorbis="yes"]) +    if test x"$with_vorbis" != x"no"; then
+        PKG_CHECK_MODULES([VORBIS], [ogg vorbis], [have_vorbis=yes], \
[have_vorbis=no]) +        if test x"$with_vorbis" = x"yes" && test x"$have_vorbis" = \
"xno"; then +            AC_MSG_ERROR([Vorbis support requested, but libvorbis not \
found]) +        elif test x"$have_vorbis" = x"yes"; then
+            AC_DEFINE([HAVE_VORBIS], 1, [Define this if you have vorbis])
+        fi
+    fi
+    AM_CONDITIONAL([ENABLE_VORBIS], [test x"$have_vorbis" = x"yes"])
+
+
+    dnl real (optional; enabled by default)
+    dnl On some systems, we cannot enable Real codecs support to begin with.
+    dnl This includes Darwin, because it uses Mach-O rather than ELF.
+    AC_ARG_ENABLE([real-codecs],
+                  [AS_HELP_STRING([--enable-real-codecs], [Enable Real binary codecs \
support (default: enabled)])], +                  [test x"$enableval" != x"no" && \
enable_real_codecs="yes"]) +    AC_ARG_WITH([real-codecs-path],
+                [AS_HELP_STRING([--with-real-codecs-path=PATH], [Specify directory \
for Real binary codecs])]) +    if test x"$enable_real_codecs" != x"no"; then
+        case "$host_os" in
+            darwin*) have_real_codecs=no ;;
+            *)
+                have_real_codecs=yes
+
+                dnl For those that have a replacement, break at the first one found
+                AC_CHECK_SYMBOLS([__environ _environ environ], [break], \
[need_weak_aliases=yes]) +                AC_CHECK_SYMBOLS([stderr __stderrp], \
[break], [need_weak_aliases=yes]) +
+                dnl For these there are no replacements
+                AC_CHECK_SYMBOLS([___brk_addr __ctype_b])
+
+                if test x"$need_weak_aliases" = x"yes"; then
+                    CC_ATTRIBUTE_ALIAS([], [have_real_codecs=no])
+                fi
+                ;;
+        esac
+        if test x"$enable_real_codecs" = x"yes" && test x"$have_real_codecs" != \
x"yes"; then +            AC_MSG_ERROR([Binary Real codec support requested, but it \
is not available]) +        elif test x"$have_real_codecs" = x"yes"; then
+            if test "${with_real_codecs_path+set}" = "set"; then
+                AC_DEFINE_UNQUOTED([REAL_CODEC_PATH], ["$with_real_codecs_path"], \
[Default path in which to find Real binary codecs]) +            fi
+        fi
+    fi
+    AM_CONDITIONAL([ENABLE_REAL], [test x"$have_real_codecs" = x"yes"])
+
+
+    dnl w32dll (optional; x86 only; enabled if using GNU as; GNU as required)
+    AC_ARG_ENABLE([w32dll],
+                  [AS_HELP_STRING([--enable-w32dll], [Enable Win32 DLL support \
(default: enabled)])], +                  [test x"$enableval" != x"no" && \
enable_w32dll="yes"], +                  [test x"$with_gnu_as" != x"yes" && \
enable_w32dll="no"]) +    AC_ARG_WITH([w32-path],
+                [AS_HELP_STRING([--with-w32-path=PATH], [location of Win32 binary \
codecs])], +                [w32_path="$withval"], [w32_path="/usr/lib/codecs"])
+    if test x"$enable_w32dll" != x"no"; then
+        case "$host_or_hostalias" in
+            *-mingw* | *-cygwin) have_w32dll=no ;;
+            i?86-* | k?-* | athlon-* | pentium*-) have_w32dll="$with_gnu_as" ;;
+            *) enable_w32dll=no ;;
+        esac
+        if test x"$enable_w32dll" = x"yes" && test x"$have_w32dll" != x"yes"; then
+            AC_MSG_ERROR([Win32 DLL support requested, but Win32 DLL support is not \
available]) +        fi
+    fi
+    AC_SUBST(w32_path)
+    AM_CONDITIONAL([ENABLE_W32DLL], [test x"$have_w32dll" = x"yes"])
+
+
+    dnl wavpack (optional; disabled by default)
+    AC_ARG_WITH([wavpack],
+                [AS_HELP_STRING([--with-wavpack], [Enable Wavpack decoder (requires \
libwavpack)])], +                [test x"$withval" != x"no" && with_wavpack="yes"], \
[with_wavpack="no"]) +    if test x"$with_wavpack" != x"no"; then
+        PKG_CHECK_MODULES([WAVPACK], [wavpack], [have_wavpack=yes], \
[have_wavpack=no]) +        if test x"$with_wavpack" = x"yes" && test \
x"$have_wavpack" != x"yes"; then +            AC_MSG_ERROR([Wavpack decoder support \
requested, but libwavpack not found]) +        fi
+    fi
+    AM_CONDITIONAL([ENABLE_WAVPACK], [test x"$have_wavpack" = x"yes"])
+
+
+    dnl Only enable building dmx image if either gdk_pixbuf or ImageMagick are \
enabled +    AM_CONDITIONAL([BUILD_DMX_IMAGE], [test x"$have_imagemagick" = x"yes" -o \
x"$have_gdkpixbuf" = x"yes"]) +])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/Makefile.am
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/Makefile.am	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,32 @@
+include $(top_srcdir)/misc/Makefile.common
+
+EXTRA_DIST = \
+	codeset.m4 \
+	gettext.m4 \
+	glibc2.m4 \
+	glibc21.m4 \
+	iconv.m4 \
+	intdiv0.m4 \
+	intmax.m4 \
+	inttypes-pri.m4 \
+	inttypes.m4 \
+	inttypes_h.m4 \
+	isc-posix.m4 \
+	lcmessage.m4 \
+	lib-ld.m4 \
+	lib-link.m4 \
+	lib-prefix.m4 \
+	longdouble.m4 \
+	longlong.m4 \
+	nls.m4 \
+	po.m4 \
+	printf-posix.m4 \
+	progtest.m4 \
+	signed.m4 \
+	size_max.m4 \
+	stdint_h.m4 \
+	uintmax_t.m4 \
+	ulonglong.m4 \
+	wchar_t.m4 \
+	wint_t.m4 \
+	xsize.m4
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/codeset.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/codeset.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,21 @@
+# codeset.m4 serial AM1 (gettext-0.10.40)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_LANGINFO_CODESET],
+[
+  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
+    [AC_TRY_LINK([#include <langinfo.h>],
+      [char* cs = nl_langinfo(CODESET);],
+      am_cv_langinfo_codeset=yes,
+      am_cv_langinfo_codeset=no)
+    ])
+  if test $am_cv_langinfo_codeset = yes; then
+    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
+      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+  fi
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/gettext.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/gettext.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,419 @@
+# gettext.m4 serial 59 (gettext-0.16.1)
+dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2006.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
+dnl    default (if it is not specified or empty) is 'no-libtool'.
+dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
+dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
+dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl    depending on --{enable,disable}-{shared,static} and on the presence of
+dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
+dnl    $(top_builddir)/intl/libintl.a will be created.
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl    implementations (in libc or libintl) without the ngettext() function
+dnl    will be ignored.  If NEEDSYMBOL is specified and is
+dnl    'need-formatstring-macros', then GNU gettext implementations that don't
+dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
+dnl INTLDIR is used to find the intl libraries.  If empty,
+dnl    the value `$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl    and used.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl    Catalog format: none
+dnl    Catalog extension: none
+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+[
+  dnl Argument checking.
+  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , \
[ifelse([$1], [use-libtool], , +    [errprint([ERROR: invalid first argument to \
AM_GNU_GETTEXT +])])])])])
+  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], \
[need-formatstring-macros], , +    [errprint([ERROR: invalid second argument to \
AM_GNU_GETTEXT +])])])])
+  define([gt_included_intl],
+    ifelse([$1], [external],
+      ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
+      [yes]))
+  define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
+  gt_NEEDS_INIT
+  AM_GNU_GETTEXT_NEED([$2])
+
+  AC_REQUIRE([AM_PO_SUBDIRS])dnl
+  ifelse(gt_included_intl, yes, [
+    AC_REQUIRE([AM_INTL_SUBDIR])dnl
+  ])
+
+  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+
+  dnl Sometimes libintl requires libiconv, so first search for libiconv.
+  dnl Ideally we would do this search only after the
+  dnl      if test "$USE_NLS" = "yes"; then
+  dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; \
}; then +  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+  dnl the configure script would need to contain the same shell code
+  dnl again, outside any 'if'. There are two solutions:
+  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
+  dnl documented, we avoid it.
+  ifelse(gt_included_intl, yes, , [
+    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+  ])
+
+  dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
+  gt_INTL_MACOSX
+
+  dnl Set USE_NLS.
+  AC_REQUIRE([AM_NLS])
+
+  ifelse(gt_included_intl, yes, [
+    BUILD_INCLUDED_LIBINTL=no
+    USE_INCLUDED_LIBINTL=no
+  ])
+  LIBINTL=
+  LTLIBINTL=
+  POSUB=
+
+  dnl Add a version number to the cache macros.
+  case " $gt_needs " in
+    *" need-formatstring-macros "*) gt_api_version=3 ;;
+    *" need-ngettext "*) gt_api_version=2 ;;
+    *) gt_api_version=1 ;;
+  esac
+  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+  dnl If we use NLS figure out what method
+  if test "$USE_NLS" = "yes"; then
+    gt_use_preinstalled_gnugettext=no
+    ifelse(gt_included_intl, yes, [
[... 167 lines omitted ...]
+  fi
+
+  if test "$USE_NLS" = "yes"; then
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; \
then +        AC_MSG_CHECKING([how to link with libintl])
+        AC_MSG_RESULT([$LIBINTL])
+        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+      fi
+
+      dnl For backward compatibility. Some packages may be using this.
+      AC_DEFINE(HAVE_GETTEXT, 1,
+       [Define if the GNU gettext() function is already present or preinstalled.])
+      AC_DEFINE(HAVE_DCGETTEXT, 1,
+       [Define if the GNU dcgettext() function is already present or preinstalled.])
+    fi
+
+    dnl We need to process the po/ directory.
+    POSUB=po
+  fi
+
+  ifelse(gt_included_intl, yes, [
+    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+    dnl to 'yes' because some of the testsuite requires it.
+    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
+      BUILD_INCLUDED_LIBINTL=yes
+    fi
+
+    dnl Make all variables we use known to autoconf.
+    AC_SUBST(BUILD_INCLUDED_LIBINTL)
+    AC_SUBST(USE_INCLUDED_LIBINTL)
+    AC_SUBST(CATOBJEXT)
+
+    dnl For backward compatibility. Some configure.ins may be using this.
+    nls_cv_header_intl=
+    nls_cv_header_libgt=
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    DATADIRNAME=share
+    AC_SUBST(DATADIRNAME)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    INSTOBJEXT=.mo
+    AC_SUBST(INSTOBJEXT)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    GENCAT=gencat
+    AC_SUBST(GENCAT)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    INTLOBJS=
+    if test "$USE_INCLUDED_LIBINTL" = yes; then
+      INTLOBJS="\$(GETTOBJS)"
+    fi
+    AC_SUBST(INTLOBJS)
+
+    dnl Enable libtool support if the surrounding package wishes it.
+    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
+    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
+  ])
+
+  dnl For backward compatibility. Some Makefiles may be using this.
+  INTLLIBS="$LIBINTL"
+  AC_SUBST(INTLLIBS)
+
+  dnl Make all documented variables known to autoconf.
+  AC_SUBST(LIBINTL)
+  AC_SUBST(LTLIBINTL)
+  AC_SUBST(POSUB)
+])
+
+
+dnl Checks for special options needed on MacOS X.
+dnl Defines INTL_MACOSX_LIBS.
+AC_DEFUN([gt_INTL_MACOSX],
+[
+  dnl Check for API introduced in MacOS X 10.2.
+  AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
+    gt_cv_func_CFPreferencesCopyAppValue,
+    [gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
+       [CFPreferencesCopyAppValue(NULL, NULL)],
+       [gt_cv_func_CFPreferencesCopyAppValue=yes],
+       [gt_cv_func_CFPreferencesCopyAppValue=no])
+     LIBS="$gt_save_LIBS"])
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
+      [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the \
CoreFoundation framework.]) +  fi
+  dnl Check for API introduced in MacOS X 10.3.
+  AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
+    [gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
+       [gt_cv_func_CFLocaleCopyCurrent=yes],
+       [gt_cv_func_CFLocaleCopyCurrent=no])
+     LIBS="$gt_save_LIBS"])
+  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
+      [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the \
CoreFoundation framework.]) +  fi
+  INTL_MACOSX_LIBS=
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test \
$gt_cv_func_CFLocaleCopyCurrent = yes; then +    INTL_MACOSX_LIBS="-Wl,-framework \
-Wl,CoreFoundation" +  fi
+  AC_SUBST([INTL_MACOSX_LIBS])
+])
+
+
+dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
+m4_define([gt_NEEDS_INIT],
+[
+  m4_divert_text([DEFAULTS], [gt_needs=])
+  m4_define([gt_NEEDS_INIT], [])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
+AC_DEFUN([AM_GNU_GETTEXT_NEED],
+[
+  m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/glibc2.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/glibc2.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,30 @@
+# glibc2.m4 serial 1
+dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Test for the GNU C Library, version 2.0 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([gt_GLIBC2],
+  [
+    AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer,
+      ac_cv_gnu_library_2,
+      [AC_EGREP_CPP([Lucky GNU user],
+	[
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ >= 2)
+  Lucky GNU user
+ #endif
+#endif
+	],
+	ac_cv_gnu_library_2=yes,
+	ac_cv_gnu_library_2=no)
+      ]
+    )
+    AC_SUBST(GLIBC2)
+    GLIBC2="$ac_cv_gnu_library_2"
+  ]
+)
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/glibc21.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/glibc21.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,30 @@
+# glibc21.m4 serial 3
+dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Test for the GNU C Library, version 2.1 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([gl_GLIBC21],
+  [
+    AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
+      ac_cv_gnu_library_2_1,
+      [AC_EGREP_CPP([Lucky GNU user],
+	[
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+  Lucky GNU user
+ #endif
+#endif
+	],
+	ac_cv_gnu_library_2_1=yes,
+	ac_cv_gnu_library_2_1=no)
+      ]
+    )
+    AC_SUBST(GLIBC21)
+    GLIBC21="$ac_cv_gnu_library_2_1"
+  ]
+)
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/iconv.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/iconv.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,101 @@
+# iconv.m4 serial AM4 (gettext-0.11.3)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+
+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+  dnl accordingly.
+  AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+  dnl those with the standalone portable GNU libiconv installed).
+
+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+  dnl accordingly.
+  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+  dnl because if the user has installed libiconv and not disabled its use
+  dnl via --without-libiconv-prefix, he wants to use it. The first
+  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+  am_save_CPPFLAGS="$CPPFLAGS"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
+    am_cv_func_iconv="no, consider installing GNU libiconv"
+    am_cv_lib_iconv=no
+    AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+      [iconv_t cd = iconv_open("","");
+       iconv(cd,NULL,NULL,NULL,NULL);
+       iconv_close(cd);],
+      am_cv_func_iconv=yes)
+    if test "$am_cv_func_iconv" != yes; then
+      am_save_LIBS="$LIBS"
+      LIBS="$LIBS $LIBICONV"
+      AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+        [iconv_t cd = iconv_open("","");
+         iconv(cd,NULL,NULL,NULL,NULL);
+         iconv_close(cd);],
+        am_cv_lib_iconv=yes
+        am_cv_func_iconv=yes)
+      LIBS="$am_save_LIBS"
+    fi
+  ])
+  if test "$am_cv_func_iconv" = yes; then
+    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+  fi
+  if test "$am_cv_lib_iconv" = yes; then
+    AC_MSG_CHECKING([how to link with libiconv])
+    AC_MSG_RESULT([$LIBICONV])
+  else
+    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+    dnl either.
+    CPPFLAGS="$am_save_CPPFLAGS"
+    LIBICONV=
+    LTLIBICONV=
+  fi
+  AC_SUBST(LIBICONV)
+  AC_SUBST(LTLIBICONV)
+])
+
+AC_DEFUN([AM_ICONV],
+[
+  AM_ICONV_LINK
+  if test "$am_cv_func_iconv" = yes; then
+    AC_MSG_CHECKING([for iconv declaration])
+    AC_CACHE_VAL(am_cv_proto_iconv, [
+      AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t \
*outbytesleft); +#else
+size_t iconv();
+#endif
+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 \
char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) +    \
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` +    \
AC_MSG_RESULT([$]{ac_t:- +         }[$]am_cv_proto_iconv)
+    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+      [Define as const if the declaration of iconv() needs const.])
+  fi
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/intdiv0.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/intdiv0.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,70 @@
+# intdiv0.m4 serial 1 (gettext-0.11.3)
+dnl Copyright (C) 2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gt_INTDIV0],
+[
+  AC_REQUIRE([AC_PROG_CC])dnl
+  AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+  AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
+    gt_cv_int_divbyzero_sigfpe,
+    [
+      AC_TRY_RUN([
+#include <stdlib.h>
+#include <signal.h>
+
+static void
+#ifdef __cplusplus
+sigfpe_handler (int sig)
+#else
+sigfpe_handler (sig) int sig;
+#endif
+{
+  /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
+  exit (sig != SIGFPE);
+}
+
+int x = 1;
+int y = 0;
+int z;
+int nan;
+
+int main ()
+{
+  signal (SIGFPE, sigfpe_handler);
+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
+  signal (SIGTRAP, sigfpe_handler);
+#endif
+/* Linux/SPARC yields signal SIGILL.  */
+#if defined (__sparc__) && defined (__linux__)
+  signal (SIGILL, sigfpe_handler);
+#endif
+
+  z = x / y;
+  nan = y / y;
+  exit (1);
+}
+], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
+        [
+          # Guess based on the CPU.
+          case "$host_cpu" in
+            alpha* | i[34567]86 | m68k | s390*)
+              gt_cv_int_divbyzero_sigfpe="guessing yes";;
+            *)
+              gt_cv_int_divbyzero_sigfpe="guessing no";;
+          esac
+        ])
+    ])
+  case "$gt_cv_int_divbyzero_sigfpe" in
+    *yes) value=1;;
+    *) value=0;;
+  esac
+  AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
+    [Define if integer division by zero raises signal SIGFPE.])
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/intmax.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/intmax.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,30 @@
+# intmax.m4 serial 2 (gettext-0.14.2)
+dnl Copyright (C) 2002-2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether the system has the 'intmax_t' type, but don't attempt to
+dnl find a replacement if it is lacking.
+
+AC_DEFUN([gt_TYPE_INTMAX_T],
+[
+  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+  AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
+    [AC_TRY_COMPILE([
+#include <stddef.h>
+#include <stdlib.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+#include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+#include <inttypes.h>
+#endif
+], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
+  if test $gt_cv_c_intmax_t = yes; then
+    AC_DEFINE(HAVE_INTMAX_T, 1,
+      [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
+  fi
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/inttypes-pri.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/inttypes-pri.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,30 @@
+# inttypes-pri.m4 serial 1 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
+# macros to non-string values.  This is the case on AIX 4.3.3.
+
+AC_DEFUN([gt_INTTYPES_PRI],
+[
+  AC_REQUIRE([gt_HEADER_INTTYPES_H])
+  if test $gt_cv_header_inttypes_h = yes; then
+    AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
+      gt_cv_inttypes_pri_broken,
+      [
+        AC_TRY_COMPILE([#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
+      ])
+  fi
+  if test "$gt_cv_inttypes_pri_broken" = yes; then
+    AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
+      [Define if <inttypes.h> exists and defines unusable PRI* macros.])
+  fi
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/inttypes.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/inttypes.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,25 @@
+# inttypes.m4 serial 1 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
+# <sys/types.h>.
+
+AC_DEFUN([gt_HEADER_INTTYPES_H],
+[
+  AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
+  [
+    AC_TRY_COMPILE(
+      [#include <sys/types.h>
+#include <inttypes.h>],
+      [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
+  ])
+  if test $gt_cv_header_inttypes_h = yes; then
+    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
+      [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
+  fi
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/inttypes_h.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/inttypes_h.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,26 @@
+# inttypes_h.m4 serial 6
+dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
+[
+  AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h,
+  [AC_TRY_COMPILE(
+    [#include <sys/types.h>
+#include <inttypes.h>],
+    [uintmax_t i = (uintmax_t) -1;],
+    gl_cv_header_inttypes_h=yes,
+    gl_cv_header_inttypes_h=no)])
+  if test $gl_cv_header_inttypes_h = yes; then
+    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
+      [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
+       and declares uintmax_t. ])
+  fi
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/isc-posix.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/isc-posix.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,24 @@
+# isc-posix.m4 serial 2 (gettext-0.11.2)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# This file is not needed with autoconf-2.53 and newer.  Remove it in 2005.
+
+# This test replaces the one in autoconf.
+# Currently this macro should have the same name as the autoconf macro
+# because gettext's gettext.m4 (distributed in the automake package)
+# still uses it.  Otherwise, the use in gettext.m4 makes autoheader
+# give these diagnostics:
+#   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
+#   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
+
+undefine([AC_ISC_POSIX])
+
+AC_DEFUN([AC_ISC_POSIX],
+  [
+    dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
+    AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
+  ]
+)
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/lcmessage.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/lcmessage.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,30 @@
+# lcmessage.m4 serial 4 (gettext-0.14.2)
+dnl Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+
+AC_DEFUN([gt_LC_MESSAGES],
+[
+  AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES,
+    [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+       gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)])
+  if test $gt_cv_val_LC_MESSAGES = yes; then
+    AC_DEFINE(HAVE_LC_MESSAGES, 1,
+      [Define if your <locale.h> file defines LC_MESSAGES.])
+  fi
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/lib-ld.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/lib-ld.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,110 @@
+# lib-ld.m4 serial 3 (gettext-0.13)
+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  acl_cv_prog_gnu_ld=yes ;;
+*)
+  acl_cv_prog_gnu_ld=no ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH(gnu-ld,
+[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# 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
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by GCC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]* | [A-Za-z]:[\\/]*)]
+      [re_direlt='/[^/][^/]*/\.\./']
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(acl_cv_path_LD,
+[if test -z "$LD"; then
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      acl_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break ;;
+      *)
+	test "$with_gnu_ld" != yes && break ;;
+      esac
+    fi
+  done
+  IFS="$ac_save_ifs"
+else
+  acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/lib-link.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/lib-link.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,644 @@
+# lib-link.m4 serial 9 (gettext-0.16)
+dnl Copyright (C) 2001-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ(2.50)
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  define([Name],[translit([$1],[./-], [___])])
+  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+    AC_LIB_LINKFLAGS_BODY([$1], [$2])
+    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+  ])
+  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+  dnl results of this search when this library appears as a dependency.
+  HAVE_LIB[]NAME=yes
+  undefine([Name])
+  undefine([NAME])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. If found, it
+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  define([Name],[translit([$1],[./-], [___])])
+  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+  dnl accordingly.
+  AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+  dnl because if the user has installed lib[]Name and not disabled its use
+  dnl via --without-lib[]Name-prefix, he wants to use it.
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+    ac_save_LIBS="$LIBS"
+    LIBS="$LIBS $LIB[]NAME"
+    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+    LIBS="$ac_save_LIBS"
+  ])
+  if test "$ac_cv_lib[]Name" = yes; then
+    HAVE_LIB[]NAME=yes
+    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
+    AC_MSG_CHECKING([how to link with lib[]$1])
+    AC_MSG_RESULT([$LIB[]NAME])
+  else
+    HAVE_LIB[]NAME=no
+    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+    dnl $INC[]NAME either.
+    CPPFLAGS="$ac_save_CPPFLAGS"
+    LIB[]NAME=
+    LTLIB[]NAME=
+  fi
+  AC_SUBST([HAVE_LIB]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  undefine([Name])
+  undefine([NAME])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
+dnl hardcode_direct, hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
+  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
+  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
+  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
+  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
+  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+    . ./conftest.sh
+    rm -f ./conftest.sh
+    acl_cv_rpath=done
+  ])
+  wl="$acl_cv_wl"
+  libext="$acl_cv_libext"
+  shlibext="$acl_cv_shlibext"
+  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  hardcode_direct="$acl_cv_hardcode_direct"
+  hardcode_minus_L="$acl_cv_hardcode_minus_L"
+  dnl Determine whether the user wants rpath handling at all.
+  AC_ARG_ENABLE(rpath,
+    [  --disable-rpath         do not hardcode runtime library paths],
+    :, enable_rpath=yes)
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
[... 392 lines omitted ...]
+      dnl pass all path elements in one option. We can arrange that for a
+      dnl single library, but not when more than one $LIBNAMEs are used.
+      alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+      done
+      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
+      acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+    else
+      dnl The -rpath options are cumulative.
+      for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+    dnl When using libtool, the option that works for both libraries and
+    dnl executables is -R. The -R options are cumulative.
+    for found_dir in $ltrpathdirs; do
+      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+    done
+  fi
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+  for element in [$2]; do
+    haveit=
+    for x in $[$1]; do
+      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      [$1]="${[$1]}${[$1]:+ }$element"
+    fi
+  done
+])
+
+dnl For those cases where a variable contains several -L and -l options
+dnl referring to unknown libraries and directories, this macro determines the
+dnl necessary additional linker options for the runtime path.
+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
+dnl otherwise linking without libtool is assumed.
+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
+[
+  AC_REQUIRE([AC_LIB_RPATH])
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  $1=
+  if test "$enable_rpath" != no; then
+    if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+      dnl Use an explicit option to hardcode directories into the resulting
+      dnl binary.
+      rpathdirs=
+      next=
+      for opt in $2; do
+        if test -n "$next"; then
+          dir="$next"
+          dnl No need to hardcode the standard /usr/lib.
+          if test "X$dir" != "X/usr/$acl_libdirstem"; then
+            rpathdirs="$rpathdirs $dir"
+          fi
+          next=
+        else
+          case $opt in
+            -L) next=yes ;;
+            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+                 dnl No need to hardcode the standard /usr/lib.
+                 if test "X$dir" != "X/usr/$acl_libdirstem"; then
+                   rpathdirs="$rpathdirs $dir"
+                 fi
+                 next= ;;
+            *) next= ;;
+          esac
+        fi
+      done
+      if test "X$rpathdirs" != "X"; then
+        if test -n ""$3""; then
+          dnl libtool is used for linking. Use -R options.
+          for dir in $rpathdirs; do
+            $1="${$1}${$1:+ }-R$dir"
+          done
+        else
+          dnl The linker is used for linking directly.
+          if test -n "$hardcode_libdir_separator"; then
+            dnl Weird platform: only the last -rpath option counts, the user
+            dnl must pass all path elements in one option.
+            alldirs=
+            for dir in $rpathdirs; do
+              alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir"
+            done
+            acl_save_libdir="$libdir"
+            libdir="$alldirs"
+            eval flag=\"$hardcode_libdir_flag_spec\"
+            libdir="$acl_save_libdir"
+            $1="$flag"
+          else
+            dnl The -rpath options are cumulative.
+            for dir in $rpathdirs; do
+              acl_save_libdir="$libdir"
+              libdir="$dir"
+              eval flag=\"$hardcode_libdir_flag_spec\"
+              libdir="$acl_save_libdir"
+              $1="${$1}${$1:+ }$flag"
+            done
+          fi
+        fi
+      fi
+    fi
+  fi
+  AC_SUBST([$1])
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/lib-prefix.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/lib-prefix.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,185 @@
+# lib-prefix.m4 serial 5 (gettext-0.15)
+dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+dnl require excessive bracketing.
+ifdef([AC_HELP_STRING],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  dnl By default, look in $includedir and $libdir.
+  use_additional=yes
+  AC_LIB_WITH_FINAL_PREFIX([
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+  ])
+  AC_LIB_ARG_WITH([lib-prefix],
+[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+  --without-lib-prefix    don't search for libraries in includedir and libdir],
+[
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+        AC_LIB_WITH_FINAL_PREFIX([
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+        ])
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+      fi
+    fi
+])
+  if test $use_additional = yes; then
+    dnl Potentially add $additional_includedir to $CPPFLAGS.
+    dnl But don't add it
+    dnl   1. if it's the standard /usr/include,
+    dnl   2. if it's already present in $CPPFLAGS,
+    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
+    dnl   4. if it doesn't exist as a directory.
+    if test "X$additional_includedir" != "X/usr/include"; then
+      haveit=
+      for x in $CPPFLAGS; do
+        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+        if test "X$x" = "X-I$additional_includedir"; then
+          haveit=yes
+          break
+        fi
+      done
+      if test -z "$haveit"; then
+        if test "X$additional_includedir" = "X/usr/local/include"; then
+          if test -n "$GCC"; then
+            case $host_os in
+              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+            esac
+          fi
+        fi
+        if test -z "$haveit"; then
+          if test -d "$additional_includedir"; then
+            dnl Really add $additional_includedir to $CPPFLAGS.
+            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+          fi
+        fi
+      fi
+    fi
+    dnl Potentially add $additional_libdir to $LDFLAGS.
+    dnl But don't add it
+    dnl   1. if it's the standard /usr/lib,
+    dnl   2. if it's already present in $LDFLAGS,
+    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
+    dnl   4. if it doesn't exist as a directory.
+    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+      haveit=
+      for x in $LDFLAGS; do
+        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+        if test "X$x" = "X-L$additional_libdir"; then
+          haveit=yes
+          break
+        fi
+      done
+      if test -z "$haveit"; then
+        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+          if test -n "$GCC"; then
+            case $host_os in
+              linux*) haveit=yes;;
+            esac
+          fi
+        fi
+        if test -z "$haveit"; then
+          if test -d "$additional_libdir"; then
+            dnl Really add $additional_libdir to $LDFLAGS.
+            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+          fi
+        fi
+      fi
+    fi
+  fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+  dnl Unfortunately, prefix and exec_prefix get only finally determined
+  dnl at the end of configure.
+  if test "X$prefix" = "XNONE"; then
+    acl_final_prefix="$ac_default_prefix"
+  else
+    acl_final_prefix="$prefix"
+  fi
+  if test "X$exec_prefix" = "XNONE"; then
+    acl_final_exec_prefix='${prefix}'
+  else
+    acl_final_exec_prefix="$exec_prefix"
+  fi
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+  prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  $1
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
+dnl the basename of the libdir, either "lib" or "lib64".
+AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
+[
+  dnl There is no formal standard regarding lib and lib64. The current
+  dnl practice is that on a system supporting 32-bit and 64-bit instruction
+  dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
+  dnl libraries go under $prefix/lib. We determine the compiler's default
+  dnl mode by looking at the compiler's library search path. If at least
+  dnl of its elements ends in /lib64 or points to a directory whose absolute
+  dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
+  dnl default, namely "lib".
+  acl_libdirstem=lib
+  searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e \
's,^libraries: ,,p' | sed -e 's,^=,,'` +  if test -n "$searchpath"; then
+    acl_save_IFS="${IFS= 	}"; IFS=":"
+    for searchdir in $searchpath; do
+      if test -d "$searchdir"; then
+        case "$searchdir" in
+          */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+          *) searchdir=`cd "$searchdir" && pwd`
+             case "$searchdir" in
+               */lib64 ) acl_libdirstem=lib64 ;;
+             esac ;;
+        esac
+      fi
+    done
+    IFS="$acl_save_IFS"
+  fi
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/longdouble.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/longdouble.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,28 @@
+# longdouble.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether the compiler supports the 'long double' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_LONGDOUBLE],
+[
+  AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
+    [if test "$GCC" = yes; then
+       gt_cv_c_long_double=yes
+     else
+       AC_TRY_COMPILE([
+         /* The Stardent Vistra knows sizeof(long double), but does not support it.  \
*/ +         long double foo = 0.0;
+         /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
+         int array [2*(sizeof(long double) >= sizeof(double)) - 1];
+         ], ,
+         gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
+     fi])
+  if test $gt_cv_c_long_double = yes; then
+    AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
+  fi
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/longlong.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/longlong.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,23 @@
+# longlong.m4 serial 5
+dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_LONG_LONG if 'long long' works.
+
+AC_DEFUN([gl_AC_TYPE_LONG_LONG],
+[
+  AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
+  [AC_TRY_LINK([long long ll = 1LL; int i = 63;],
+    [long long llmax = (long long) -1;
+     return ll << i | ll >> i | llmax / ll | llmax % ll;],
+    ac_cv_type_long_long=yes,
+    ac_cv_type_long_long=no)])
+  if test $ac_cv_type_long_long = yes; then
+    AC_DEFINE(HAVE_LONG_LONG, 1,
+      [Define if you have the 'long long' type.])
+  fi
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/nls.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/nls.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,31 @@
+# nls.m4 serial 3 (gettext-0.15)
+dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ(2.50)
+
+AC_DEFUN([AM_NLS],
+[
+  AC_MSG_CHECKING([whether NLS is requested])
+  dnl Default is enabled NLS
+  AC_ARG_ENABLE(nls,
+    [  --disable-nls           do not use Native Language Support],
+    USE_NLS=$enableval, USE_NLS=yes)
+  AC_MSG_RESULT($USE_NLS)
+  AC_SUBST(USE_NLS)
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/po.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/po.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,428 @@
+# po.m4 serial 13 (gettext-0.15)
+dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ(2.50)
+
+dnl Checks for all prerequisites of the po subdirectory.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+  AC_REQUIRE([AC_PROG_INSTALL])dnl
+  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+  AC_REQUIRE([AM_NLS])dnl
+
+  dnl Perform the following tests also if --disable-nls has been given,
+  dnl because they are needed for "make dist" to work.
+
+  dnl Search for GNU msgfmt in the PATH.
+  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+  dnl The second test excludes FreeBSD msgfmt.
+  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+    [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage \
>/dev/null; then exit 1; else exit 0; fi)], +    :)
+  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+
+  dnl Test whether it is GNU msgfmt >= 0.15.
+changequote(,)dnl
+  case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+    *) MSGFMT_015=$MSGFMT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([MSGFMT_015])
+changequote(,)dnl
+  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+    *) GMSGFMT_015=$GMSGFMT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([GMSGFMT_015])
+
+  dnl Search for GNU xgettext 0.12 or newer in the PATH.
+  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+  dnl The second test excludes FreeBSD xgettext.
+  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= \
/dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && +     (if $ac_dir/$ac_word --omit-header \
--copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage \
>/dev/null; then exit 1; else exit 0; fi)], +    :)
+  dnl Remove leftover from FreeBSD xgettext call.
+  rm -f messages.po
+
+  dnl Test whether it is GNU xgettext >= 0.15.
+changequote(,)dnl
+  case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+    *) XGETTEXT_015=$XGETTEXT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([XGETTEXT_015])
+
+  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+    [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], \
:) +
+  dnl Installation directories.
+  dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
+  dnl have to define it here, so that it can be used in po/Makefile.
+  test -n "$localedir" || localedir='${datadir}/locale'
+  AC_SUBST([localedir])
+
+  AC_CONFIG_COMMANDS([po-directories], [[
+    for ac_file in $CONFIG_FILES; do
+      # Support "outfile[:infile[:infile...]]"
+      case "$ac_file" in
+        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+      esac
+      # PO directories have a Makefile.in generated from Makefile.in.in.
+      case "$ac_file" in */Makefile.in)
+        # Adjust a relative srcdir.
+        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+        # In autoconf-2.13 it is called $ac_given_srcdir.
+        # In autoconf-2.50 it is called $srcdir.
+        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+        case "$ac_given_srcdir" in
+          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+          /*) top_srcdir="$ac_given_srcdir" ;;
+          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+        esac
+        # Treat a directory as a PO directory if and only if it has a
+        # POTFILES.in file. This allows packages to have multiple PO
+        # directories under different names or in different locations.
+        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+          rm -f "$ac_dir/POTFILES"
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo \
"creating $ac_dir/POTFILES" +          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | \
sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e \
"\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" +          POMAKEFILEDEPS="POTFILES.in"
+          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+          # on $ac_dir but don't depend on user-specified configuration
+          # parameters.
+          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+            # The LINGUAS file contains the set of available languages.
+            if test -n "$OBSOLETE_ALL_LINGUAS"; then
+              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in \
is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" +            \
fi +            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" \
"$ac_given_srcdir/$ac_dir/LINGUAS"` +            # Hide the ALL_LINGUAS assigment \
from automake < 1.5. [... 176 lines omitted ...]
+  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+    # The LINGUAS file contains the set of available languages.
+    ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+  else
+    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
+    sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e \
's/VARIABLE/LINGUAS/g'` +    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
+  fi
+  # Hide the ALL_LINGUAS assigment from automake < 1.5.
+  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+  # Compute POFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+  # Compute UPDATEPOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+  # Compute DUMMYPOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+  # Compute GMOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+  # Compute PROPERTIESFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), \
$(top_srcdir)/$(DOMAIN)_$(lang).properties) +  # Compute CLASSFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
+  # Compute QMFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
+  # Compute MSGFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+  # Compute RESOURCESDLLFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob \
$(lang))/$(DOMAIN).resources.dll) +  case "$ac_given_srcdir" in
+    .) srcdirpre= ;;
+    *) srcdirpre='$(srcdir)/' ;;
+  esac
+  POFILES=
+  UPDATEPOFILES=
+  DUMMYPOFILES=
+  GMOFILES=
+  PROPERTIESFILES=
+  CLASSFILES=
+  QMFILES=
+  MSGFILES=
+  RESOURCESDLLFILES=
+  for lang in $ALL_LINGUAS; do
+    POFILES="$POFILES $srcdirpre$lang.po"
+    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+    PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
+    CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
+    QMFILES="$QMFILES $srcdirpre$lang.qm"
+    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e \
'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` +    MSGFILES="$MSGFILES \
$srcdirpre$frobbedlang.msg" +    frobbedlang=`echo $lang | sed -e 's/_/-/g' -e \
's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e \
's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` +    \
RESOURCESDLLFILES="$RESOURCESDLLFILES \
$srcdirpre$frobbedlang/\$(DOMAIN).resources.dll" +  done
+  # CATALOGS depends on both $ac_dir and the user's LINGUAS
+  # environment variable.
+  INST_LINGUAS=
+  if test -n "$ALL_LINGUAS"; then
+    for presentlang in $ALL_LINGUAS; do
+      useit=no
+      if test "%UNSET%" != "$LINGUAS"; then
+        desiredlanguages="$LINGUAS"
+      else
+        desiredlanguages="$ALL_LINGUAS"
+      fi
+      for desiredlang in $desiredlanguages; do
+        # Use the presentlang catalog if desiredlang is
+        #   a. equal to presentlang, or
+        #   b. a variant of presentlang (because in this case,
+        #      presentlang can be used as a fallback for messages
+        #      which are not translated in the desiredlang catalog).
+        case "$desiredlang" in
+          "$presentlang"*) useit=yes;;
+        esac
+      done
+      if test $useit = yes; then
+        INST_LINGUAS="$INST_LINGUAS $presentlang"
+      fi
+    done
+  fi
+  CATALOGS=
+  JAVACATALOGS=
+  QTCATALOGS=
+  TCLCATALOGS=
+  CSHARPCATALOGS=
+  if test -n "$INST_LINGUAS"; then
+    for lang in $INST_LINGUAS; do
+      CATALOGS="$CATALOGS $lang.gmo"
+      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
+      QTCATALOGS="$QTCATALOGS $lang.qm"
+      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e \
'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` +      \
TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg" +      frobbedlang=`echo $lang | sed -e \
's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e \
's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` +      \
CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll" +    done
+  fi
+
+  sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e \
"s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e \
"s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e \
"s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e \
"s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e \
"s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e \
"s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e \
"s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > \
"$ac_file.tmp" +  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
+    # Add dependencies that cannot be formulated as a simple suffix rule.
+    for lang in $ALL_LINGUAS; do
+      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e \
'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` +      cat >> \
"$ac_file.tmp" <<EOF +$frobbedlang.msg: $lang.po
+	@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+	\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f \
"\$(srcdir)/$frobbedlang.msg"; exit 1; } +EOF
+    done
+  fi
+  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
+    # Add dependencies that cannot be formulated as a simple suffix rule.
+    for lang in $ALL_LINGUAS; do
+      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e \
's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e \
's/^uz-UZ$/uz-UZ-Latn/'` +      cat >> "$ac_file.tmp" <<EOF
+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+	@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \
\$(DOMAIN)"; \ +	\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po \
-r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } +EOF
+    done
+  fi
+  if test -n "$POMAKEFILEDEPS"; then
+    cat >> "$ac_file.tmp" <<EOF
+Makefile: $POMAKEFILEDEPS
+EOF
+  fi
+  mv "$ac_file.tmp" "$ac_file"
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/printf-posix.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/printf-posix.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,44 @@
+# printf-posix.m4 serial 2 (gettext-0.13.1)
+dnl Copyright (C) 2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether the printf() function supports POSIX/XSI format strings with
+dnl positions.
+
+AC_DEFUN([gt_PRINTF_POSIX],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
+    gt_cv_func_printf_posix,
+    [
+      AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+/* The string "%2$d %1$d", with dollar characters protected from the shell's
+   dollar expansion (possibly an autoconf bug).  */
+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
+static char buf[100];
+int main ()
+{
+  sprintf (buf, format, 33, 55);
+  return (strcmp (buf, "55 33") != 0);
+}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
+      [
+        AC_EGREP_CPP(notposix, [
+#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined \
__CYGWIN__ +  notposix
+#endif
+        ], gt_cv_func_printf_posix="guessing no",
+           gt_cv_func_printf_posix="guessing yes")
+      ])
+    ])
+  case $gt_cv_func_printf_posix in
+    *yes)
+      AC_DEFINE(HAVE_POSIX_PRINTF, 1,
+        [Define if your printf() function supports format strings with positions.])
+      ;;
+  esac
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/progtest.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/progtest.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,92 @@
+# progtest.m4 serial 4 (gettext-0.14.2)
+dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+AC_PREREQ(2.50)
+
+# Search path for a program which passes the given test.
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[
+# Prepare PATH_SEPARATOR.
+# 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
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+  [[\\/]]* | ?:[[\\/]]*)
+    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+    ;;
+  *)
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in ifelse([$5], , $PATH, [$5]); do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
+          if [$3]; then
+            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    done
+    IFS="$ac_save_IFS"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+    ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+  AC_MSG_RESULT([$]$1)
+else
+  AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/signed.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/signed.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,17 @@
+# signed.m4 serial 1 (gettext-0.10.40)
+dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([bh_C_SIGNED],
+[
+  AC_CACHE_CHECK([for signed], bh_cv_c_signed,
+   [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
+  if test $bh_cv_c_signed = no; then
+    AC_DEFINE(signed, ,
+              [Define to empty if the C compiler doesn't support this keyword.])
+  fi
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/size_max.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/size_max.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,59 @@
+# size_max.m4 serial 2
+dnl Copyright (C) 2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gl_SIZE_MAX],
+[
+  AC_CHECK_HEADERS(stdint.h)
+  dnl First test whether the system already has SIZE_MAX.
+  AC_MSG_CHECKING([for SIZE_MAX])
+  result=
+  AC_EGREP_CPP([Found it], [
+#include <limits.h>
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef SIZE_MAX
+Found it
+#endif
+], result=yes)
+  if test -z "$result"; then
+    dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
+    dnl than the type 'unsigned long'.
+    dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
+    dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
+    _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
+      [#include <stddef.h>], result=?)
+    _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
+      [#include <stddef.h>], result=?)
+    _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
+      [#include <stddef.h>], result=?)
+    if test "$fits_in_uint" = 1; then
+      dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
+      dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
+      AC_TRY_COMPILE([#include <stddef.h>
+        extern size_t foo;
+        extern unsigned long foo;
+        ], [], fits_in_uint=0)
+    fi
+    if test -z "$result"; then
+      if test "$fits_in_uint" = 1; then
+        result="$res_hi$res_lo"U
+      else
+        result="$res_hi$res_lo"UL
+      fi
+    else
+      dnl Shouldn't happen, but who knows...
+      result='~(size_t)0'
+    fi
+  fi
+  AC_MSG_RESULT([$result])
+  if test "$result" != yes; then
+    AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
+      [Define as the maximum value of type 'size_t', if the system doesn't define \
it.]) +  fi
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/stdint_h.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/stdint_h.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,26 @@
+# stdint_h.m4 serial 5
+dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([gl_AC_HEADER_STDINT_H],
+[
+  AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h,
+  [AC_TRY_COMPILE(
+    [#include <sys/types.h>
+#include <stdint.h>],
+    [uintmax_t i = (uintmax_t) -1;],
+    gl_cv_header_stdint_h=yes,
+    gl_cv_header_stdint_h=no)])
+  if test $gl_cv_header_stdint_h = yes; then
+    AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
+      [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
+       and declares uintmax_t. ])
+  fi
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/uintmax_t.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/uintmax_t.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,30 @@
+# uintmax_t.m4 serial 9
+dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+AC_PREREQ(2.13)
+
+# Define uintmax_t to 'unsigned long' or 'unsigned long long'
+# if it is not already defined in <stdint.h> or <inttypes.h>.
+
+AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
+[
+  AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+  AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+  if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
+    AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG])
+    test $ac_cv_type_unsigned_long_long = yes \
+      && ac_type='unsigned long long' \
+      || ac_type='unsigned long'
+    AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
+      [Define to unsigned long or unsigned long long
+       if <stdint.h> and <inttypes.h> don't define.])
+  else
+    AC_DEFINE(HAVE_UINTMAX_T, 1,
+      [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
+  fi
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/ulonglong.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/ulonglong.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,23 @@
+# ulonglong.m4 serial 4
+dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
+
+AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG],
+[
+  AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
+  [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
+    [unsigned long long ullmax = (unsigned long long) -1;
+     return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
+    ac_cv_type_unsigned_long_long=yes,
+    ac_cv_type_unsigned_long_long=no)])
+  if test $ac_cv_type_unsigned_long_long = yes; then
+    AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
+      [Define if you have the 'unsigned long long' type.])
+  fi
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/wchar_t.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/wchar_t.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,20 @@
+# wchar_t.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether <stddef.h> has the 'wchar_t' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WCHAR_T],
+[
+  AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
+    [AC_TRY_COMPILE([#include <stddef.h>
+       wchar_t foo = (wchar_t)'\0';], ,
+       gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
+  if test $gt_cv_c_wchar_t = yes; then
+    AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
+  fi
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/wint_t.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/wint_t.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,20 @@
+# wint_t.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether <wchar.h> has the 'wint_t' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WINT_T],
+[
+  AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
+    [AC_TRY_COMPILE([#include <wchar.h>
+       wint_t foo = (wchar_t)'\0';], ,
+       gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
+  if test $gt_cv_c_wint_t = yes; then
+    AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
+  fi
+])
diff -r 3e9d711a77870cbbca8db3bca3dcacad6092064f -r \
                df73844e8a47005bef76ffe6cd9323d8e6a1c218 m4/gettext/xsize.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/gettext/xsize.m4	Wed Jun 06 23:36:19 2007 +0100
@@ -0,0 +1,13 @@
+# xsize.m4 serial 3
+dnl Copyright (C) 2003-2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_XSIZE],
+[
+  dnl Prerequisites of lib/xsize.h.
+  AC_REQUIRE([gl_SIZE_MAX])
+  AC_REQUIRE([AC_C_INLINE])
+  AC_CHECK_HEADERS(stdint.h)
+])

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Xine-cvslog mailing list
Xine-cvslog@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-cvslog


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic