summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libxtrans/COPYING39
-rw-r--r--lib/libxtrans/ChangeLog247
-rw-r--r--lib/libxtrans/INSTALL143
-rw-r--r--lib/libxtrans/Makefile.am54
-rw-r--r--lib/libxtrans/Makefile.in290
-rw-r--r--lib/libxtrans/README7
-rw-r--r--lib/libxtrans/Xtrans.c10
-rw-r--r--lib/libxtrans/Xtrans.mm789
-rw-r--r--lib/libxtrans/Xtransint.h2
-rw-r--r--lib/libxtrans/Xtranslcl.c21
-rw-r--r--lib/libxtrans/Xtranssock.c23
-rw-r--r--lib/libxtrans/aclocal.m4999
-rw-r--r--lib/libxtrans/configure1299
-rw-r--r--lib/libxtrans/configure.ac34
-rw-r--r--lib/libxtrans/doc/Makefile.am62
-rw-r--r--lib/libxtrans/doc/Makefile.in430
-rw-r--r--lib/libxtrans/doc/xtrans.xml1206
-rw-r--r--lib/libxtrans/xtrans.m446
18 files changed, 4142 insertions, 1559 deletions
diff --git a/lib/libxtrans/COPYING b/lib/libxtrans/COPYING
index a7977606d..d2dbc2cfa 100644
--- a/lib/libxtrans/COPYING
+++ b/lib/libxtrans/COPYING
@@ -1,4 +1,4 @@
-Copyright 1993, 1994, 1998 The Open Group
+Copyright 1993, 1994, 1998, 2002 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
@@ -48,29 +48,26 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
______________________________________________________________________________
-Copyright 2002, 2005 Sun Microsystems, Inc. All rights reserved.
+Copyright (c) 2002, 2005, Oracle and/or its affiliates. All rights reserved.
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
+The above copyright notice and this permission notice (including the next
+paragraph) shall be included in all copies or substantial portions of the
+Software.
-Except as contained in this notice, the name of the copyright holders shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the copyright holders.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
______________________________________________________________________________
diff --git a/lib/libxtrans/ChangeLog b/lib/libxtrans/ChangeLog
index 9b32e5219..ea8805240 100644
--- a/lib/libxtrans/ChangeLog
+++ b/lib/libxtrans/ChangeLog
@@ -1,3 +1,250 @@
+commit 59f57d1a19d4091fef115b9eafa139bf620332cb
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Mon Nov 8 16:33:45 2010 -0800
+
+ xtrans 1.2.6
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 05cd71c899e83022147f27085ee652d26f5462cb
+Author: Jesse Adkins <jesserayadkins@gmail.com>
+Date: Sat Nov 6 12:53:24 2010 -0700
+
+ Remove ISCFuncs, fix SCOFuncs inclusion (bug 23324)
+
+ ISCFuncs was removed by commit 339ddc413559d4cb117a72f87b2a70dae6911c32.
+ SCOFuncs should be for SCO only, instead of !sun.
+
+ Also, remove comments that suggest ISC support.
+
+ Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
+ Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 0e5a66c82535dd8e9beee9fc4c42c52f90d05f50
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Nov 6 13:22:59 2010 -0700
+
+ doc: Update for X11R7/modularization
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 1858516e9f0f3e65cc3d1f6cedfe8bfa614c8082
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Nov 6 11:22:15 2010 -0700
+
+ doc: Markup & typo cleanups
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 16bdc50ca85bbae065a32647e2410a5ca47b4924
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Nov 6 09:53:08 2010 -0700
+
+ doc: Correct legal notices
+
+ Restore both copyright/license notices from troff version
+ Move implementation note out of legalnotice section
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit d01d081538d04ac60b9e14f6e2faa60fe6bed5ff
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Nov 6 09:23:26 2010 -0700
+
+ doc: Use installed css stylesheet instead of making another copy
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit ea6977f4a51612172ba51c3bd35aa150ad9ff158
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Nov 6 12:41:48 2010 -0700
+
+ Xtransint.h: Add missing ' in comment
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 862d2de24950d2658158ebc4cf8307e73f80bc8d
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Oct 29 18:22:33 2010 -0700
+
+ Sun's copyrights now belong to Oracle
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit cbb59ebc916d0be18c322eec782b694f4dc2e685
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Sun Jun 27 20:27:39 2010 -0400
+
+ Update README to reflect docs converted from nroff to DocBook XML
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 3441142714b2640d1e143fcb5d089a2a42bd5321
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Sun Jun 27 20:21:20 2010 -0400
+
+ doc: remove trailing spaces in xtrans.xml
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 7761846c7fd97f15d7207e1b9fd9d42c9e58a0c4
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Sat Jun 26 13:06:22 2010 -0400
+
+ doc: replace groff input format with docbook xml format
+
+ Initial version of xtrans docbook xml.
+ Requires util-macros 1.10
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 4f557036253ac5750576c88e5b9a86759a49d247
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Fri Jun 18 21:47:52 2010 -0400
+
+ config: XORG_WITH_GROFF: use HAVE_GROFF_HTML conditional
+
+ Groff uses grohtml to generate html output format. This program, in turn,
+ uses a number of pnm* commands from the netpbm package, psselect
+ from the psutils package and the ghostscript package.
+
+ These are independently installed, so they could be missing.
+ Skip the HTML output format if one of the dependencies is missing.
+ The version 1.9 of the util-macros package is required.
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 1e9b958a096682b1ec111d400bd25048e3f95ed4
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri May 21 18:54:20 2010 -0700
+
+ Update README to reflect docs moved here from xorg-docs module
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit d400e69526c1c331e8e23893e2ba8658979376e8
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Mon Mar 29 14:53:49 2010 -0400
+
+ config: remove the pkgconfig pc.in file from EXTRA_DIST
+
+ Automake always includes it in the tarball.
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 373922e1529b3d55513fbc0ec24527600f7b529c
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Tue Feb 16 18:18:06 2010 -0500
+
+ doc: use HAVE_GROFF_MM to skip doc when 'm.tmac' macros missing
+
+ This conditional is defined in XORG_WITH_GROFF macro.
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit b531ff3ed2ad841b716ba370fd43bbe8f06f1185
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Fri Jan 29 15:05:37 2010 -0500
+
+ doc: use new macros XORG_WITH_GROFF and PS2PDF
+
+ These control the usage of doc tools
+ Also use XORG_ENABLE_DOCS to control generation of docs
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 5922556f408fbcd14e7ad23bbe46db2ae8dcdee6
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Thu Jan 14 21:11:43 2010 -0800
+
+ Update Sun license notices to current X.Org standard form
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit dab2bcdaf60977643ec55d71a81e67c1e3a162a9
+Author: Rémi Cardona <remi@gentoo.org>
+Date: Thu Dec 17 08:31:20 2009 +0100
+
+ require autoconf 2.60 because of $(docdir) use
+
+ Signed-off-by: Rémi Cardona <remi@gentoo.org>
+ Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
+ Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
+ Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
+
+commit 197ec0dc83e775e42fce4966142ae3a641f2db69
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Fri Nov 27 20:56:05 2009 -0500
+
+ Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
+
+ Now that the INSTALL file is generated.
+ Allows running make maintainer-clean.
+
+commit 27a18fb2c9356cc44bdd892f87200c3ea230109b
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Wed Oct 28 14:09:11 2009 -0400
+
+ INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
+
+ Add missing INSTALL file. Use standard GNU file on building tarball
+ README may have been updated
+ Remove AUTHORS file as it is empty and no content available yet.
+ Remove NEWS file as it is empty and no content available yet.
+
+commit 92da89326d26e0924d4c6efe2ebd26ceb527f4f7
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Mon Oct 26 22:08:43 2009 -0400
+
+ Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
+
+ ChangeLog filename is known to Automake and requires no further
+ coding in the makefile.
+
+commit 9aeff40d0722b4fedc4ab9ccc1aaff75368020fe
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Thu Oct 22 12:34:20 2009 -0400
+
+ .gitignore: use common defaults with custom section # 24239
+
+ Using common defaults will reduce errors and maintenance.
+ Only the very small or inexistent custom section need periodic maintenance
+ when the structure of the component changes. Do not edit defaults.
+
+commit f0f7c47055eecac35786ec616c7632604da204b5
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date: Wed Oct 21 12:47:27 2009 -0700
+
+ This is not a GNU project, so declare it foreign.
+
+ On Wed, 2009-10-21 at 13:36 +1000, Peter Hutterer wrote:
+ > On Tue, Oct 20, 2009 at 08:23:55PM -0700, Jeremy Huddleston wrote:
+ > > I noticed an INSTALL file in xlsclients and libXvMC today, and it
+ > > was quite annoying to work around since 'autoreconf -fvi' replaces
+ > > it and git wants to commit it. Should these files even be in git?
+ > > Can I nuke them for the betterment of humanity and since they get
+ > > created by autoreconf anyways?
+ >
+ > See https://bugs.freedesktop.org/show_bug.cgi?id=24206
+
+ As an interim measure, replace AM_INIT_AUTOMAKE([dist-bzip2]) with
+ AM_INIT_AUTOMAKE([foreign dist-bzip2]). This will prevent the generation
+ of the INSTALL file. It is also part of the 24206 solution.
+
+ Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
+
+commit 7d98b9b03c5fd5a82f9f4d215b10c0926edeab00
+Author: Eric Sesterhenn <eric.sesterhenn@lsexperts.de>
+Date: Mon Oct 19 09:53:18 2009 -0700
+
+ Bug 24612: Memory & fd leaks in local transports
+
+ X.Org bug #24612 <http://bugs.freedesktop.org/show_bug.cgi?id=24612>
+ Patch #30548 <http://bugs.freedesktop.org/attachment.cgi?id=30548>
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
commit 1127b8ec766ed8c48cc49b0779647fb697a07ebd
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Sat Oct 17 13:14:03 2009 -0700
diff --git a/lib/libxtrans/INSTALL b/lib/libxtrans/INSTALL
index 23e5f25d0..8b82ade08 100644
--- a/lib/libxtrans/INSTALL
+++ b/lib/libxtrans/INSTALL
@@ -1,16 +1,19 @@
Installation Instructions
*************************
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
-Software Foundation, Inc.
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008 Free Software Foundation, Inc.
-This file is free documentation; the Free Software Foundation gives
+ This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
-These are generic installation instructions.
+ Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package. The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
@@ -23,9 +26,9 @@ debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring. (Caching is
+the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
-cache files.)
+cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
@@ -35,20 +38,17 @@ some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'. You only need
-`configure.ac' if you want to change it or regenerate `configure' using
-a newer version of `autoconf'.
+`configure' by a program called `autoconf'. You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system. If you're
- using `csh' on an old version of System V, you might need to type
- `sh ./configure' instead to prevent `csh' from trying to execute
- `configure' itself.
+ `./configure' to configure the package for your system.
- Running `configure' takes awhile. While running, it prints some
- messages telling which features it is checking for.
+ Running `configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
2. Type `make' to compile the package.
@@ -67,42 +67,57 @@ The simplest way to compile this package is:
all sorts of other programs in order to regenerate files that came
with the distribution.
+ 6. Often, you can also type `make uninstall' to remove the installed
+ files again.
+
Compilers and Options
=====================
-Some systems require unusual options for compilation or linking that the
-`configure' script does not know about. Run `./configure --help' for
-details on some of the pertinent environment variables.
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
- ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
-You can compile the package for more than one kind of computer at the
+ You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
-own directory. To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'. `cd' to the
+own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
- If you have to use a `make' that does not support the `VPATH'
-variable, you have to compile the package for one architecture at a
-time in the source code directory. After you have installed the
-package for one architecture, use `make distclean' before reconfiguring
-for another architecture.
+ With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory. After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+ On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor. Like
+this:
+
+ ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CPP="gcc -E" CXXCPP="g++ -E"
+
+ This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
Installation Names
==================
-By default, `make install' installs the package's commands under
+ By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX'.
@@ -125,7 +140,7 @@ option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
-Some packages pay attention to `--enable-FEATURE' options to
+ Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
@@ -137,14 +152,36 @@ find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
+Particular systems
+==================
+
+ On HP-UX, the default C compiler is not ANSI C compatible. If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+ ./configure CC="cc -Ae"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+ On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file. The option `-nodtk' can be used as
+a workaround. If GNU CC is not installed, it is therefore recommended
+to try
+
+ ./configure CC="cc"
+
+and if that doesn't work, try
+
+ ./configure CC="cc -nodtk"
+
Specifying the System Type
==========================
-There may be some features `configure' cannot figure out automatically,
-but needs to determine by the type of machine the package will run on.
-Usually, assuming the package is built to be run on the _same_
-architectures, `configure' can figure that out, but if it prints a
-message saying it cannot guess the machine type, give it the
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
@@ -170,9 +207,9 @@ eventually be run) with `--host=TYPE'.
Sharing Defaults
================
-If you want to set default values for `configure' scripts to share, you
-can create a site shell script called `config.site' that gives default
-values for variables like `CC', `cache_file', and `prefix'.
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
@@ -181,7 +218,7 @@ A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
-Variables not defined in a site shell script can be set in the
+ Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
@@ -190,21 +227,29 @@ them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script). Here is a another example:
+overridden in the site shell script).
- /bin/bash ./configure CONFIG_SHELL=/bin/bash
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug. Until the bug is fixed you can use this workaround:
-Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
-configuration-related scripts to be executed by `/bin/bash'.
+ CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
-`configure' recognizes the following options to control how it operates.
+ `configure' recognizes the following options to control how it
+operates.
`--help'
`-h'
- Print a summary of the options to `configure', and exit.
+ Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+ Print a summary of the options unique to this package's
+ `configure', and exit. The `short' variant lists options used
+ only in the top level, while the `recursive' variant lists options
+ also present in any nested packages.
`--version'
`-V'
@@ -231,6 +276,16 @@ configuration-related scripts to be executed by `/bin/bash'.
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
+`--prefix=DIR'
+ Use DIR as the installation prefix. *Note Installation Names::
+ for more details, including other options available for fine-tuning
+ the installation locations.
+
+`--no-create'
+`-n'
+ Run the configure checks, but stop before creating any output
+ files.
+
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
diff --git a/lib/libxtrans/Makefile.am b/lib/libxtrans/Makefile.am
index 11d311ee8..7ce7cbfee 100644
--- a/lib/libxtrans/Makefile.am
+++ b/lib/libxtrans/Makefile.am
@@ -1,3 +1,5 @@
+SUBDIRS=doc
+
Xtransincludedir = $(includedir)/X11/Xtrans
Xtransinclude_HEADERS = \
Xtrans.h \
@@ -15,55 +17,15 @@ aclocal_DATA = xtrans.m4
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xtrans.pc
-EXTRA_DIST = xtrans.pc.in ${aclocal_DATA} ChangeLog Xtrans.mm
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+EXTRA_DIST = ${aclocal_DATA}
-MAINTAINERCLEANFILES = ChangeLog
+.PHONY: ChangeLog INSTALL
-.PHONY: ChangeLog
+INSTALL:
+ $(INSTALL_CMD)
ChangeLog:
$(CHANGELOG_CMD)
-dist-hook: ChangeLog
-
-# Rules to convert documentation from troff to other formats
-doc_sources = Xtrans.mm
-
-if HAVE_PS2PDF
-printable_format = .pdf
-else
-printable_format = .ps
-endif
-
-if BUILD_DOCS
-doc_DATA = $(doc_sources:.mm=.txt) \
- $(doc_sources:.mm=$(printable_format)) \
- $(doc_sources:.mm=.html)
-
-CLEANFILES = $(doc_DATA)
-MOSTLYCLEANFILES = index.*
-
-# Pass version string as a troff string for substitution
-GROFF_DEFS = -dxV="$(PACKAGE_STRING)"
-
-# -t to run through tbl
-GROFF_FLAGS = -t -mm $(GROFF_DEFS)
-
-SUFFIXES = .mm .ps .txt .html .pdf
-
-.mm.ps:
- -$(AM_V_GEN) $(GROFF) -Tps $(GROFF_FLAGS) $< 2> index.$@.raw > $@
- @if grep '^[^1-9.]' index.$@.raw | grep -v warning; then exit 1; \
- else test $$? -le 1; fi
-
-.mm.txt:
- $(AM_V_GEN) env GROFF_NO_SGR=TRUE $(GROFF) -Tutf8 $(GROFF_FLAGS) \
- $< 2> index.$@.raw > $@
-
-.mm.html:
- $(AM_V_GEN) $(GROFF) -Thtml $(GROFF_FLAGS) $< 2> index.$@.raw > $@
-
-.ps.pdf:
- $(AM_V_GEN) $(PS2PDF) $< $@
-
-endif BUILD_DOCS
+dist-hook: ChangeLog INSTALL
diff --git a/lib/libxtrans/Makefile.in b/lib/libxtrans/Makefile.in
index 05cc3d272..861419b06 100644
--- a/lib/libxtrans/Makefile.in
+++ b/lib/libxtrans/Makefile.in
@@ -53,22 +53,28 @@ mkinstalldirs = $(SHELL) $(install_sh) -d
CONFIG_CLEAN_FILES = xtrans.pc
SOURCES =
DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(aclocaldir)" "$(DESTDIR)$(docdir)" \
+am__installdirs = "$(DESTDIR)$(aclocaldir)" \
"$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(Xtransincludedir)"
aclocalDATA_INSTALL = $(INSTALL_DATA)
-docDATA_INSTALL = $(INSTALL_DATA)
pkgconfigDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(aclocal_DATA) $(doc_DATA) $(pkgconfig_DATA)
+DATA = $(aclocal_DATA) $(pkgconfig_DATA)
XtransincludeHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(Xtransinclude_HEADERS)
ETAGS = etags
CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@@ -79,20 +85,20 @@ am__remove_distdir = \
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APP_MAN_DIR = @APP_MAN_DIR@
APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BUILD_DOCS_FALSE = @BUILD_DOCS_FALSE@
-BUILD_DOCS_TRUE = @BUILD_DOCS_TRUE@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -109,13 +115,22 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
+ENABLE_DOCS_FALSE = @ENABLE_DOCS_FALSE@
+ENABLE_DOCS_TRUE = @ENABLE_DOCS_TRUE@
EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
+FOP = @FOP@
GREP = @GREP@
-GROFF = @GROFF@
-HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@
-HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@
+HAVE_FOP_FALSE = @HAVE_FOP_FALSE@
+HAVE_FOP_TRUE = @HAVE_FOP_TRUE@
+HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@
+HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@
+HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@
+HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@
+HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@
+HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@
+INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -130,6 +145,7 @@ MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
+MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
OBJEXT = @OBJEXT@
@@ -140,11 +156,17 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PS2PDF = @PS2PDF@
+PKG_CONFIG = @PKG_CONFIG@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@
VERSION = @VERSION@
+XMLTO = @XMLTO@
+XORG_MAN_PAGE = @XORG_MAN_PAGE@
+XORG_SGML_PATH = @XORG_SGML_PATH@
+XSL_STYLESHEET = @XSL_STYLESHEET@
ac_ct_CC = @ac_ct_CC@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
@@ -161,7 +183,6 @@ build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
-distcleancheck_listfiles = @distcleancheck_listfiles@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
@@ -191,6 +212,7 @@ sharedstatedir = @sharedstatedir@
sticky_bit_define = @sticky_bit_define@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+SUBDIRS = doc
Xtransincludedir = $(includedir)/X11/Xtrans
Xtransinclude_HEADERS = \
Xtrans.h \
@@ -206,45 +228,26 @@ aclocaldir = $(datadir)/aclocal
aclocal_DATA = xtrans.m4
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xtrans.pc
-EXTRA_DIST = xtrans.pc.in ${aclocal_DATA} ChangeLog Xtrans.mm
-MAINTAINERCLEANFILES = ChangeLog
-
-# Rules to convert documentation from troff to other formats
-doc_sources = Xtrans.mm
-@HAVE_PS2PDF_FALSE@printable_format = .ps
-@HAVE_PS2PDF_TRUE@printable_format = .pdf
-@BUILD_DOCS_TRUE@doc_DATA = $(doc_sources:.mm=.txt) \
-@BUILD_DOCS_TRUE@ $(doc_sources:.mm=$(printable_format)) \
-@BUILD_DOCS_TRUE@ $(doc_sources:.mm=.html)
-
-@BUILD_DOCS_TRUE@CLEANFILES = $(doc_DATA)
-@BUILD_DOCS_TRUE@MOSTLYCLEANFILES = index.*
-
-# Pass version string as a troff string for substitution
-@BUILD_DOCS_TRUE@GROFF_DEFS = -dxV="$(PACKAGE_STRING)"
-
-# -t to run through tbl
-@BUILD_DOCS_TRUE@GROFF_FLAGS = -t -mm $(GROFF_DEFS)
-@BUILD_DOCS_TRUE@SUFFIXES = .mm .ps .txt .html .pdf
-all: all-am
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+EXTRA_DIST = ${aclocal_DATA}
+all: all-recursive
.SUFFIXES:
-.SUFFIXES: .mm .ps .txt .html .pdf
am--refresh:
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
- cd $(srcdir) && $(AUTOMAKE) --gnu \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
+ cd $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu Makefile
+ $(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -283,23 +286,6 @@ uninstall-aclocalDATA:
echo " rm -f '$(DESTDIR)$(aclocaldir)/$$f'"; \
rm -f "$(DESTDIR)$(aclocaldir)/$$f"; \
done
-install-docDATA: $(doc_DATA)
- @$(NORMAL_INSTALL)
- test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)"
- @list='$(doc_DATA)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \
- $(docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \
- done
-
-uninstall-docDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(doc_DATA)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \
- rm -f "$(DESTDIR)$(docdir)/$$f"; \
- done
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)"
@@ -335,6 +321,77 @@ uninstall-XtransincludeHEADERS:
rm -f "$(DESTDIR)$(Xtransincludedir)/$$f"; \
done
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
@@ -345,10 +402,23 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
mkid -fID $$unique
tags: TAGS
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
@@ -361,7 +431,7 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$tags $$unique; \
fi
ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
@@ -413,6 +483,21 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(mkdir_p) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook
@@ -514,31 +599,30 @@ distcleancheck: distclean
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
-check: check-am
+check: check-recursive
all-am: Makefile $(DATA) $(HEADERS)
-installdirs:
- for dir in "$(DESTDIR)$(aclocaldir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(Xtransincludedir)"; do \
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(aclocaldir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(Xtransincludedir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-installcheck: installcheck-am
+installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
- -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -547,94 +631,86 @@ maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-clean: clean-am
+clean: clean-recursive
clean-am: clean-generic mostlyclean-am
-distclean: distclean-am
+distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
-dvi: dvi-am
+dvi: dvi-recursive
dvi-am:
-html: html-am
+html: html-recursive
-info: info-am
+info: info-recursive
info-am:
install-data-am: install-XtransincludeHEADERS install-aclocalDATA \
- install-docDATA install-pkgconfigDATA
+ install-pkgconfigDATA
install-exec-am:
-install-info: install-info-am
+install-info: install-info-recursive
install-man:
installcheck-am:
-maintainer-clean: maintainer-clean-am
+maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
-mostlyclean: mostlyclean-am
+mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic
-pdf: pdf-am
+pdf: pdf-recursive
pdf-am:
-ps: ps-am
+ps: ps-recursive
ps-am:
uninstall-am: uninstall-XtransincludeHEADERS uninstall-aclocalDATA \
- uninstall-docDATA uninstall-info-am uninstall-pkgconfigDATA
-
-.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
- clean-generic ctags dist dist-all dist-bzip2 dist-gzip \
- dist-hook dist-shar dist-tarZ dist-zip distcheck distclean \
- distclean-generic distclean-tags distcleancheck distdir \
- distuninstallcheck dvi dvi-am html html-am info info-am \
- install install-XtransincludeHEADERS install-aclocalDATA \
- install-am install-data install-data-am install-docDATA \
- install-exec install-exec-am install-info install-info-am \
- install-man install-pkgconfigDATA install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
- pdf-am ps ps-am tags uninstall uninstall-XtransincludeHEADERS \
- uninstall-aclocalDATA uninstall-am uninstall-docDATA \
uninstall-info-am uninstall-pkgconfigDATA
+uninstall-info: uninstall-info-recursive
-.PHONY: ChangeLog
-
-ChangeLog:
- $(CHANGELOG_CMD)
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+ check-am clean clean-generic clean-recursive ctags \
+ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \
+ dist-shar dist-tarZ dist-zip distcheck distclean \
+ distclean-generic distclean-recursive distclean-tags \
+ distcleancheck distdir distuninstallcheck dvi dvi-am html \
+ html-am info info-am install install-XtransincludeHEADERS \
+ install-aclocalDATA install-am install-data install-data-am \
+ install-exec install-exec-am install-info install-info-am \
+ install-man install-pkgconfigDATA install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic maintainer-clean-recursive \
+ mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall \
+ uninstall-XtransincludeHEADERS uninstall-aclocalDATA \
+ uninstall-am uninstall-info-am uninstall-pkgconfigDATA
-dist-hook: ChangeLog
-@BUILD_DOCS_TRUE@.mm.ps:
-@BUILD_DOCS_TRUE@ -$(AM_V_GEN) $(GROFF) -Tps $(GROFF_FLAGS) $< 2> index.$@.raw > $@
-@BUILD_DOCS_TRUE@ @if grep '^[^1-9.]' index.$@.raw | grep -v warning; then exit 1; \
-@BUILD_DOCS_TRUE@ else test $$? -le 1; fi
+.PHONY: ChangeLog INSTALL
-@BUILD_DOCS_TRUE@.mm.txt:
-@BUILD_DOCS_TRUE@ $(AM_V_GEN) env GROFF_NO_SGR=TRUE $(GROFF) -Tutf8 $(GROFF_FLAGS) \
-@BUILD_DOCS_TRUE@ $< 2> index.$@.raw > $@
+INSTALL:
+ $(INSTALL_CMD)
-@BUILD_DOCS_TRUE@.mm.html:
-@BUILD_DOCS_TRUE@ $(AM_V_GEN) $(GROFF) -Thtml $(GROFF_FLAGS) $< 2> index.$@.raw > $@
+ChangeLog:
+ $(CHANGELOG_CMD)
-@BUILD_DOCS_TRUE@.ps.pdf:
-@BUILD_DOCS_TRUE@ $(AM_V_GEN) $(PS2PDF) $< $@
+dist-hook: ChangeLog INSTALL
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/lib/libxtrans/README b/lib/libxtrans/README
index 8560b5dfa..6b1c46835 100644
--- a/lib/libxtrans/README
+++ b/lib/libxtrans/README
@@ -10,9 +10,10 @@ system, this package simply installs the C source files into
$(prefix)/include/X11/Xtrans and installs a pkg-config file and an
autoconf m4 macro file with the flags needed to use it.
-Documentation of the xtrans API can be found in the xorg-docs package,
-in PostScript format in xorg-docs/hardcopy/xtrans/Xtrans.PS.gz and in
-the original troff format in xorg-docs/specs/xtrans/Xtrans.mm .
+Documentation of the xtrans API can be found in the included xtrans.xml
+file in DocBook XML format. If 'xmlto' is installed, you can generate text,
+html, postscript or pdf versions of the documentation by configuring
+the build with --enable-docs, which is the default.
Please submit bugs & patches to the Xorg bugzilla:
diff --git a/lib/libxtrans/Xtrans.c b/lib/libxtrans/Xtrans.c
index 611a21ae2..55f52a7e9 100644
--- a/lib/libxtrans/Xtrans.c
+++ b/lib/libxtrans/Xtrans.c
@@ -72,7 +72,7 @@ from The Open Group.
#define TRANS_LOCAL_LOCAL_INDEX 9
#define TRANS_LOCAL_PTS_INDEX 10
#define TRANS_LOCAL_NAMED_INDEX 11
-#define TRANS_LOCAL_ISC_INDEX 12
+/* 12 used to be ISC, but that's gone. */
#define TRANS_LOCAL_SCO_INDEX 13
#define TRANS_SOCKET_INET6_INDEX 14
#define TRANS_LOCAL_PIPE_INDEX 15
@@ -108,12 +108,10 @@ Xtransport_table Xtransports[] = {
#endif
#ifdef sun
{ &TRANS(PIPEFuncs), TRANS_LOCAL_PIPE_INDEX },
-#else /* !sun */
-#if !defined(__SCO__) && !defined(__UNIXWARE__)
- { &TRANS(ISCFuncs), TRANS_LOCAL_ISC_INDEX },
-#endif
- { &TRANS(SCOFuncs), TRANS_LOCAL_SCO_INDEX },
#endif /* sun */
+#if defined(__SCO__) || defined(__UNIXWARE__)
+ { &TRANS(SCOFuncs), TRANS_LOCAL_SCO_INDEX },
+#endif /* __SCO__ || __UNIXWARE__ */
#endif /* LOCALCONN */
};
diff --git a/lib/libxtrans/Xtrans.mm b/lib/libxtrans/Xtrans.mm
deleted file mode 100644
index 0d39e7d51..000000000
--- a/lib/libxtrans/Xtrans.mm
+++ /dev/null
@@ -1,789 +0,0 @@
-.\" $XFree86: xc/doc/specs/xtrans/Xtrans.mm,v 1.2 2003/07/09 15:27:27 tsi Exp $
-'\".nr Ej 1
-.PH "'''"
-.ce
-\fBX Transport Interface\fR
-.sp
-Copyright (c) 1993, 1994 NCR Corporation - Dayton, Ohio, USA
-.sp
-All Rights Reserved
-.sp
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted, provided
-that the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation, and that the name NCR not be used in advertising
-or publicity pertaining to distribution of the software without specific,
-written prior permission. NCR makes no representations about the
-suitability of this software for any purpose. It is provided "as is"
-without express or implied warranty.
-.sp
-NCR DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
-NO EVENT SHALL NCR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
-OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-.sp
-Copyright 1993, 1994, 2002 The Open Group
-.sp
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the ``Software''), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-.sp
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-.sp
-THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-.sp
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-.sp
-X Window System is a trademark of The Open Group, Inc.
-.sp
-Designed by Stuart Anderson (NCR) with help from Ralph Mor (X Consortium)
-.sp
-.ce
-\fIDraft Version 0.6\fR
-.sp
-NOTE: This documentation does not completely match the implementation in R6
-(as a result of some late changes made in the code). Specifically, support
-was added for font server cloning, and conditional compliation was introduced
-for client vs. server code.
-.bp
-.H 1 "Purposes and Goals"
-.P
-The X Transport Interface is intended to combine all system and transport
-specific code into a single place in the source tree. This API should be used
-by all libraries, clients and servers of the X Window System. Use of this API
-should allow the addition of new types of transports and support for new
-platforms without making any changes to the source except in the X Transport
-Interface code.
-.P
-This interface should solve the problem of multiple #ifdef TRANSPORT and
-#ifdef PLATFORM statements scattered throughout the source tree.
-.P
-This interface should provide enough functionality to support all types of
-protocols, including connection oriented protocols such as X11 and FS, and
-connection-less oriented protocols such as XDMCP.
-.H 1 "Overview of the interface"
-.P
-The interface provides an API for use by applications. The functions in this
-API perform work that is common to all transports and systems, such as
-parsing an address into a host and port number. The functions in this API
-call transport specific functions that are contained in a table whose
-contents are defined at compile time. This table contains an entry for each
-type of transport. Each entry is a record containing mostly pointers to
-function that implements the interface for the given transport.
-.P
-This API does not provide an abstraction for select() or poll().
-These function are themselves transport independent, so an additional interface
-is not needed for these functions. It is also unclear how such an interface
-would affect performance.
-.H 1 "Definition of Address Specification Format"
-.P
-Addresses are specified in the following syntax,
-.sp
-\fIprotocol/host:port\fR
-.sp
-where \fIprotocol\fR specifies a protocol family or an alias for a protocol
-family. A definition of common protocol families is given in a later section.
-.P
-The \fIhost\fR part specifies the name of a host or other transport dependent
-entity that could be interpreted as a Network Service Access Point (NSAP).
-.P
-The \fIport\fR part specifies the name of a Transport Service Access Point
-(TSAP). The format of the TSAP is defined by the underlying transport
-implementation, but it is represented using a string format when it is part
-of an address.
-.H 1 "Internal Data Structures"
-.P
-There are two major data structures associated with the transport independent
-portion of this interface. Additional data structures may be used internally
-by each transport.
-.H 2 "Xtransport"
-.P
-Each transport supported has an entry in the transport table.
-The transport table is an array of \fIXtransport\fR records. Each record
-contains all the entry points for a single transport. This record is defined as:
-.DS
-.nf
-typedef struct _Xtransport {
-
- char *TransName;
- int flags;
-
- XtransConnInfo (*OpenCOTSClient)(
- struct _Xtransport *, /* transport */
- char *, /* protocol */
- char *, /* host */
- char * /* port */
- );
-
- XtransConnInfo (*OpenCOTSServer)(
- struct _Xtransport *, /* transport */
- char *, /* protocol */
- char *, /* host */
- char * /* port */
- );
-
- XtransConnInfo (*OpenCLTSClient)(
- struct _Xtransport *, /* transport */
- char *, /* protocol */
- char *, /* host */
- char * /* port */
- );
-
- XtransConnInfo (*OpenCLTSServer)(
- struct _Xtransport *, /* transport */
- char *, /* protocol */
- char *, /* host */
- char * /* port */
- );
-
- int (*SetOption)(
- XtransConnInfo, /* connection */
- int, /* option */
- int /* arg */
- );
-
- int (*CreateListener)(
- XtransConnInfo, /* connection */
- char *, /* port */
- int /* flags */
- );
-
- int (*ResetListener)(
- XtransConnInfo /* connection */
- );
-
- XtransConnInfo (*Accept)(
- XtransConnInfo /* connection */
- );
-
- int (*Connect)(
- XtransConnInfo, /* connection */
- char *, /* host */
- char * /* port */
- );
-
- int (*BytesReadable)(
- XtransConnInfo, /* connection */
- BytesReadable_t * /* pend */
- );
-
- int (*Read)(
- XtransConnInfo, /* connection */
- char *, /* buf */
- int /* size */
- );
-
- int (*Write)(
- XtransConnInfo, /* connection */
- char *, /* buf */
- int /* size */
- );
-
- int (*Readv)(
- XtransConnInfo, /* connection */
- struct iovec *, /* buf */
- int /* size */
- );
-
- int (*Writev)(
- XtransConnInfo, /* connection */
- struct iovec *, /* buf */
- int /* size */
- );
-
- int (*Disconnect)(
- XtransConnInfo /* connection */
- );
-
- int (*Close)(
- XtransConnInfo /* connection */
- );
-
-} Xtransport;
-
-.fi
-.DE
-.P
-The \fIflags\fR field can contain an OR of the following masks:
-.sp
-\fITRANS_ALIAS\fR: indicates that this record is providing an alias,
-and should not be used to create a listner.
-.sp
-\fITRANS_LOCAL\fR: indicates that this is a LOCALCONN transport.
-
-.H 2 "XtransConnInfo"
-.P
-Each connection will have an opaque \fIXtransConnInfo\fR transport connection
-object allocated for it. This record contains information specific to the
-connection. The record is defined
-as:
-.DS
-.nf
-typedef struct _XtransConnInfo *XtransConnInfo;
-
-struct _XtransConnInfo {
- struct _Xtransport *transptr;
- char *priv;
- int flags;
- int fd;
- int family;
- char *addr;
- int addrlen;
- char *peeraddr;
- int peeraddrlen;
-};
-.fi
-.DE
-.H 1 "Exposed Transport Independent API"
-.P
-This API is included in each library and server that uses it. The API
-may be used by the library, but it is not added to the public API for that
-library. This interface is simply an implementation
-facilitator. This API contains a low level set of core primitives, and a few
-utility functions that are built on top of the primitives. The utility
-functions exist to provide a more familiar interface that can be used to
-port existing code.
-.P
-A macro is defined in Xtrans.h for TRANS(func) that creates a unique function
-name depending on where the code is compiled. For example, when built for Xlib,
-TRANS(OpenCOTSClient) becomes _X11TransOpenCOTSClient.
-.P
-All failures are considered fatal, and the connection should be closed and
-re-established if desired. In most cases, however, the value of errno will
-be available for debugging purposes.
-.H 2 "Core Interface API"
-.BL
-.LI
-XtransConnInfo
-TRANS(OpenCOTSClient)(char *address)
-.P
-This function creates a Connection-Oriented Transport that is suitable for
-use by a client.
-The parameter \fIaddress\fR contains the full address of the
-server to which this endpoint will be connected.
-This functions returns an opaque transport connection object on success,
-or NULL on failure.
-.LI
-XtransConnInfo
-TRANS(OpenCOTSServer)(char *address)
-.P
-This function creates a Connection-Oriented Transport that is suitable for
-use by a server.
-The parameter \fIaddress\fR contains the full address to which this
-server will be bound.
-This functions returns an opaque transport connection object on success,
-or NULL on failure.
-.LI
-XtransConnInfo
-TRANS(OpenCLTSClient)(char *address)
-.P
-This function creates a Connection-Less Transport that is suitable for
-use by a client.
-The parameter \fIaddress\fR contains the full address of the
-server to which this endpoint will be connected.
-This functions returns an opaque transport connection object on success,
-or NULL on failure.
-.LI
-XtransConnInfo
-TRANS(OpenCLTSServer)(char *address)
-.P
-This function creates a Connection-Less Transport that is suitable for
-use by a server.
-The parameter \fIaddress\fR contains the full address to which this
-server will be bound.
-This functions returns an opaque transport connection object on success,
-or NULL on failure.
-.LI
-int TRANS(SetOption)(XtransConnInfo connection, int option, int arg)
-.P
-This function sets transport options, similar to the way setsockopt() and
-ioctl() work.
-The parameter \fIconnection\fR is an endpoint that was obtained from
-_XTransOpen*() functions.
-The parameter \fIoption\fR contains the option that will be set. The actual
-values for \fIoption\fR are defined in a later section.
-The parameter \fIarg\fR can be used to pass in an additional value that may
-be required by some options.
-This function return 0 on success and -1 on failure.
-.P
-Note: Based on current usage, the complimentary function TRANS(GetOption)()
-is not necessary.
-.LI
-int TRANS(CreateListener)(XtransConnInfo connection, char *port, int flags)
-.P
-This function sets up the server endpoint for listening.
-The parameter \fIconnection\fR is an endpoint that was obtained from
-TRANS(OpenCOTSServer)() or TRANS(OpenCLTSServer)().
-The parameter \fIport\fR specifies the port to which this endpoint
-should be bound for listening.
-If \fIport\fR is NULL, then the transport may attempt to allocate any
-available TSAP for this connection. If the transport cannot support this,
-then this function will return a failure.
-The \fIflags\fR parameter can be set to ADDR_IN_USE_ALLOWED to allow
-the call to the underlying binding function to fail with a EADDRINUSE
-error without causing the TRANS(CreateListener) function itself to
-fail.
-This function return 0 on success and -1 on failure.
-.LI
-int TRANS(ResetListener)(XtransConnInfo connection)
-.P
-When a server is restarted, certain listen ports may need to be reset.
-For example, unix domain needs to check that the file used for communication
-has not been deleted. If it has, it must be recreated.
-The parameter \fIconnection\fR is an opened and bound endpoint that was
-obtained from TRANS(OpenCOTSServer)() and passed to TRANS(CreateListener)().
-This function will return one of the following values: TRANS_RESET_NOOP,
-TRANS_RESET_NEW_FD, or TRANS_RESET_FAILURE.
-.LI
-XtransConnInfo
-TRANS(Accept)(XtransConnInfo connection)
-.P
-Once a connection indication is received, this function can be called to
-accept the connection.
-The parameter \fIconnection\fR is an opened and bound endpoint that was
-obtained from TRANS(OpenCOTSServer)() and passed to TRANS(CreateListener)().
-This function will return a new opaque transport connection object upon
-success, NULL otherwise.
-.LI
-int TRANS(Connect)(XtransConnInfo connection, char *address)
-.P
-This function creates a connection to a server.
-The parameter \fIconnection\fR is an endpoint that was obtained from
-TRANS(OpenCOTSClient)().
-The parameters \fIaddress\fR specify the TSAP to which this
-endpoint should connect. If the protocol is included in the address, it will
-be ignored.
-This function return 0 on success and -1 on failure.
-.LI
-int TRANS(BytesReadable)(XtransConnInfo connection, BytesReadable_t *pend);
-.P
-This function provides the same functionality as the BytesReadable macro.
-.LI
-int TRANS(Read)(XtransConnInfo connection, char *buf, int size)
-.P
-This function will return the number of bytes requested on a COTS connection,
-and will return the minimum of the number bytes requested or the size of
-the incoming packet on a CLTS connection.
-.LI
-int TRANS(Write)(XtransConnInfo connection, char *buf, int size)
-.P
-This function will write the requested number of bytes on a COTS connection, and
-will send a packet of the requested size on a CLTS connection.
-.LI
-int TRANS(Readv)(XtransConnInfo connection, struct iovec *buf, int size)
-.P
-Similar to TRANS(Read)().
-.LI
-int TRANS(Writev)(XtransConnInfo connection, struct iovec *buf, int size)
-.P
-Similar to TRANS(Write)().
-.LI
-int TRANS(Disconnect)(XtransConnInfo connection)
-.P
-This function is used when an orderly disconnect is desired. This function
-breaks the connection on the transport. It is similar to the
-socket function shutdown().
-.LI
-int TRANS(Close)(XtransConnInfo connection)
-.P
-This function closes the transport, unbinds it, and frees all resources that
-was associated with the transport. If a TRANS(Disconnect) call was not made
-on the connection, a disorderly disconnect may occur.
-.LI
-int TRANS(IsLocal)(XtransConnInfo connection)
-.P
-Returns TRUE if it is a local transport.
-.LI
-int TRANS(GetMyAddr)(XtransConnInfo connection,
-.br
- int *familyp, int *addrlenp, Xtransaddr **addrp)
-.P
-This function is similar to getsockname(). This function will allocate space
-for the address, so it must be freed by the caller. Not all transports will
-have a valid address until a connection is established. This function should
-not be used until the connection is established with Connect() or Accept().
-.LI
-int TRANS(GetPeerAddr)(XtransConnInfo connection,
-.br
- int *familyp, int *addrlenp, Xtransaddr **addrp)
-.P
-This function is similar to getpeername(). This function will allocate space
-for the address, so it must be freed by the caller. Not all transports will
-have a valid address until a connection is established. This function should
-not be used until the connection is established with Connect() or Accept().
-.LI
-int TRANS(GetConnectionNumber)(XtransConnInfo connection)
-.P
-Returns the file descriptor associated with this transport.
-.LI
-int TRANS(MakeAllCOTSServerListeners)(
-.br
- char *port, int *partial_ret, int *count_ret, XtransConnInfo **connections_ret)
-.P
-This function should be used by most servers. It will try to establish a COTS
-server endpoint for each transport listed in the transport table.
-\fIpartial_ret\fR will be set to True if only a partial network could be
-created. \fIcount_ret\fR is the number of transports returns, and
-\fIconnections_ret\fR is the list of transports.
-.LI
-int TRANS(MakeAllCLTSServerListeners)(
-.br
- char *port, int *partial_ret, int *count_ret, XtransConnInfo **connections_ret)
-.P
-This function should be used by most servers. It will try to establish a CLTS
-server endpoint for each transport listed in the transport table.
-\fIpartial_ret\fR will be set to True if only a partial network could be
-created. \fIcount_ret\fR is the number of transports returns, and
-\fIconnections_ret\fR is the list of transports.
-.LE
-.H 2 "Utility API"
-.P
-This section describes a few useful functions that have been implemented on top
-of the Core Interface API. These functions are being provided as a convenience.
-.BL
-.LI
-int TRANS(ConvertAddress)(int *familyp, int *addrlenp, Xtransaddr *addrp)
-.P
-This function converts a sockaddr based address to an
-X authorization based address (ie AF_INET, AF_UNIX to the
-X protocol definition (ie FamilyInternet, FamilyLocal)).
-
-.LE
-.H 1 "Transport Option Definition"
-.P
-The following options are defined for the TRANS(SetOption)() function. If an
-OS or transport does not support any of these options, then it will silently
-ignore the option.
-.BL
-.LI
-TRANS_NONBLOCKING
-.P
-This option controls the blocking mode of the connection. If the argument
-is set to 1, then the connection will be set to blocking. If the argument
-is set to 0, then the connection will be set to non-blocking.
-.LI
-TRANS_CLOSEONEXEC
-.P
-This option determines what will happen to the connection when an exec
-is encountered. If the argument is set to 1, then the connection will be
-closed when an exec occurs. If the argument is set to 0, then the connection
-will not be closed when an exec occurs.
-.LE
-.H 1 "Hidden Transport Dependent API"
-.P
-The hidden transport dependent functions are placed in the Xtransport record.
-These function are similar to the Exposed Transport Independent API, but some
-of the parameters and return values are slightly different.
-Stuff like the #ifdef SUNSYSV should be handled inside these functions.
-.BL
-.LI
-XtransConnInfo *OpenCOTSClient (
-.br
- struct _Xtransport *thistrans, char *protocol, char *host, char *port)
-.P
-This function creates a Connection-Oriented Transport. The parameter
-\fIthistrans\fR points to an Xtransport entry in the transport table. The
-parameters \fIprotocol\fR, \fIhost\fR, and \fIport\fR point to strings
-containing the corresponding parts of the address that was passed into
-TRANS(OpenCOTSClient)().
-.P
-This function must allocate and initialize the contents of the XtransConnInfo
-structure that is returned by this function. This function will open the
-transport, and bind it into the transport namespace if applicable. The
-local address portion of the XtransConnInfo structure will also be filled
-in by this function.
-.LI
-XtransConnInfo *OpenCOTSServer (
-.br
- struct _Xtransport *thistrans, char *protocol, char *host, char *port)
-.P
-This function creates a Connection-Oriented Transport. The parameter
-\fIthistrans\fR points to an Xtransport entry in the transport table. The
-parameters \fIprotocol\fR, \fIhost\fR, and \fIport\fR point to strings
-containing the corresponding parts of the address that was passed into
-TRANS(OpenCOTSClient)().
-.P
-This function must allocate and initialize the contents of the XtransConnInfo
-structure that is returned by this function. This function will open the
-transport.
-.LI
-XtransConnInfo *OpenCLTSClient (
-.br
- struct _Xtransport *thistrans, char *protocol, char *host, char *port)
-.P
-This function creates a Connection-Less Transport. The parameter
-\fIthistrans\fR points to an Xtransport entry in the transport table. The
-parameters \fIprotocol\fR, \fIhost\fR, and \fIport\fR point to strings
-containing the corresponding parts of the address that was passed into
-TRANS(OpenCOTSClient)().
-.P
-This function must allocate and initialize the contents of the XtransConnInfo
-structure that is returned by this function. This function will open the
-transport, and bind it into the transport namespace if applicable. The
-local address portion of the XtransConnInfo structure will also be filled
-in by this function.
-.LI
-XtransConnInfo *OpenCLTSServer (
-.br
- struct _Xtransport *thistrans, char *protocol, char *host, char *port)
-.P
-This function creates a Connection-Less Transport. The parameter
-\fIthistrans\fR points to an Xtransport entry in the transport table. The
-parameters \fIprotocol\fR, \fIhost\fR, and \fIport\fR point to strings
-containing the corresponding parts of the address that was passed into
-TRANS(OpenCOTSClient)().
-.P
-This function must allocate and initialize the contents of the XtransConnInfo
-structure that is returned by this function. This function will open the
-transport.
-.LI
-int SetOption (struct _Xtransport *thistrans, int option, int arg)
-.P
-This function provides a transport dependent way of implementing the options
-defined by the X Transport Interface. In the current prototype, this function
-is not being used, because all of the option defined so far, are transport
-independent. This function will have to be used if a radically different
-transport type is added, or a transport dependent option is defined.
-.LI
-int CreateListener (struct _Xtransport *thistrans, char *port, int flags )
-.P
-This function takes a transport endpoint opened for a server, and sets it
-up to listen for incoming connection requests. The parameter \fIport\fR
-should contain the port portion of the address that was passed to the Open
-function.
-.P
-The parameter \fIflags\fR should be set to ADDR_IN_USE_ALLOWED if the
-underlying transport endpoint may be already bound and this should not
-be considered as an error. Otherwise \fIflags\fR sould be set to 0.
-This is used by IPv6 code, where the same socket can be bound to both
-an IPv6 address and then to a IPv4 address.
-.P
-This function will bind the transport into the transport name space if
-applicable, and fill in the local address portion of the XtransConnInfo
-structure. The transport endpoint will then be set to listen for
-incoming connection requests.
-.LI
-int ResetListener (struct _Xtransport *thistrans)
-.P
-This function resets the transport for listening.
-.LI
-XtransConnInfo Accept(struct _Xtransport *thistrans)
-.P
-This function creates a new transport endpoint as a result of an incoming
-connection request. The parameter \fIthistrans\fR is the endpoint that was opened
-for listening by the server. The new endpoint is opened and bound into the
-transport's namespace. A XtransConnInfo structure describing the new endpoint
-is returned from this function
-.LI
-int Connect(struct _Xtransport *thistrans, char *host, char *port )
-.P
-This function establishes a connection to a server. The parameters \fIhost\fR
-and \fIport\fR describe the server to which the connection should be
-established. The connection will be established so that Read() and Write()
-call can be made.
-.LI
-int BytesReadable(struct _Xtransport *thistrans, BytesReadable_t *pend )
-.P
-This function replaces the BytesReadable() macro. This allows each transport
-to have it's own mechanism for determining how much data is ready to be read.
-.LI
-int Read(struct _Xtransport *thistrans, char *buf, int size )
-.P
-This function reads \fIsize\fR bytes into \fIbuf\fR from the connection.
-.LI
-int Write(struct _Xtransport *thistrans, char *buf, int size )
-.P
-This function writes \fIsize\fR bytes from \fIbuf\fR to the connection.
-.LI
-int Readv(struct _Xtransport *thistrans, struct iovec *buf, int size )
-.P
-This function performs a readv() on the connection.
-.LI
-int Writev(struct _Xtransport *thistrans, struct iovec *buf, int size )
-.P
-This function performs a writev() on the connection.
-.LI
-int Disconnect(struct _Xtransport *thistrans)
-.P
-This function initiates an orderly shutdown of a connection. If a transport
-does not distinguish between orderly and disorderly disconnects, then a
-call to this function will have no affect.
-.LI
-int Close(struct _Xtransport *thistrans)
-.P
-This function will break the connection, and close the endpoint.
-.LE
-.H 1 "Configuration"
-.P
-The implementation of each transport can be platform specific. It is expected
-that existing connection types such as TCPCONN, UNIXCONN, LOCALCONN and
-STREAMSCONN will be replaced with flags for each possible transport type.
-.P
-Below are the flags that can be set in \fIConnectionFlags\fR in the vendor.cf
-or site.def config files.
-.TS
-center;
-l l .
-TCPCONN Enables the INET (IPv4) Domain Socket based transport
-IPv6 Extends TCPCONN to enable IPv6 Socket based transport
-UNIXCONN Enables the UNIX Domain Sokcet based transport
-STREAMSCONN Enables the TLI based transports
-LOCALCONN Enables the SYSV Local connection transports
-DNETCONN Enables the DECnet transports
-.TE
-.H 1 "Transport Specific Definitions"
-.TS
-center box;
-lb | cb sb sb
-lb | cb | cb | cb
-lb | cb | cb | cb
-l | l | l | l.
-Protocol Address Component
- _ _ _
-Family protocol host port
-=
-Internet T{
-inet
-.br
-inet6
-.br
-tcp
-.br
-udp
-T} name of an internet addressable host T{
-string containing the name of a service or a valid port number.
-.br
-Example: "xserver0", "7100"
-T}
-_
-DECnet decnet name of a DECnet addressable host T{
-string containing the complete name of the object.
-.br
-Example: "X$X0"
-T}
-_
-NETware ipx name of a NETware addressable host T{
-Not sure of the specifics yet.
-T}
-_
-OSI osi name of an OSI addressable host T{
-Not sure of the specifics yet.
-T}
-_
-Local T{
-local
-.br
-pts
-.br
-named
-.br
-sco
-.br
-isc
-T} (ignored) T{
-String containing the port name, ie "xserver0", "fontserver0".
-T}
-.TE
-.H 1 "Implementation Notes"
-.P
-This section refers to the prototype implementation that is being developed
-concurrently with this document. This prototype has been able to flush out
-many details and problems as the specification was being developed.
-.P
-All of the source code for this interface is located in xc/lib/xtrans.
-.P
-All functions names in the source are of the format TRANS(func)(). The TRANS()
-macro is defined as
-.DS
-.sp
-#if (__STDC__ && !defined(UNIXCPP)) || defined(ANSICPP)
-#define TRANS(func) _PROTOCOLTrans##func
-#else
-#define TRANS(func) _PROTOCOLTrans/**/func
-#endif
-.sp
-.DE
-PROTOCOL will be uniquely defined in each directory where this code
-is compiled. PROTOCOL will be defined to be the name of the protocol that is
-implemented by the library or server, such as X11, FS, and ICE.
-.P
-All libraries and servers that use the X Transport Interface should have a new
-file called transport.c. This file will include the transports based
-on the configuration flags \fIConnectionFlags\fR. Below is an example
-transport.c.
-.DS
-.nf
-#include "Xtransint.h"
-
-#ifdef DNETCONN
-#include "Xtransdnet.c"
-#endif
-#ifdef LOCALCONN
-#include "Xtranslocal.c"
-#endif
-#ifdef TCPCONN
-#include "Xtranssock.c"
-#endif
-#ifdef STREAMSCONN
-#include "Xtranstli.c"
-#endif
-#include "Xtrans.c"
-#include "Xtransutil.c"
-.fi
-.DE
-.P
-The source files for this interface are listed below.
-.DS
-.TS
-center;
-l l.
-Xtrans.h T{
-Function prototypes and defines for
-the Transport Independent API.
-T}
-Xtransint.h T{
-Used by the interface implementation only.
-Contains the internal data structures.
-T}
-Xtranssock.c T{
-Socket implementation of the Transport Dependent API.
-T}
-Xtranstli.c T{
-TLI implementation of the Transport Dependent API.
-T}
-Xtransdnet.c T{
-DECnet implementation of the Transport Dependent API.
-T}
-Xtranslocal.c T{
-Implementation of the Transport Dependent API for
-SYSV Local connections.
-T}
-Xtrans.c T{
-Exposed Transport Independent API Functions.
-T}
-Xtransutil.c T{
-Collection of Utility functions that use the
-X Transport Interface.
-T}
-.TE
-.DE
-.P
-The file \fIXtransint.h\fR contains much of the transport related code that
-previously in Xlibint.h and Xlibnet.h. This will make the definitions
-available for all transport users. This should also obsolete the equivalent
-code in other libraries.
diff --git a/lib/libxtrans/Xtransint.h b/lib/libxtrans/Xtransint.h
index cd5b64ff2..dd1f683b3 100644
--- a/lib/libxtrans/Xtransint.h
+++ b/lib/libxtrans/Xtransint.h
@@ -300,7 +300,7 @@ typedef struct _Xtransport_table {
#define TRANS_LOCAL (1<<1) /* local transport */
#define TRANS_DISABLED (1<<2) /* Don't open this one */
#define TRANS_NOLISTEN (1<<3) /* Don't listen on this one */
-#define TRANS_NOUNLINK (1<<4) /* Dont unlink transport endpoints */
+#define TRANS_NOUNLINK (1<<4) /* Don't unlink transport endpoints */
#define TRANS_ABSTRACT (1<<5) /* Use abstract sockets if available */
#define TRANS_NOXAUTH (1<<6) /* Don't verify authentication (because it's secure some other way at the OS layer) */
diff --git a/lib/libxtrans/Xtranslcl.c b/lib/libxtrans/Xtranslcl.c
index 83911565b..ca04e7f03 100644
--- a/lib/libxtrans/Xtranslcl.c
+++ b/lib/libxtrans/Xtranslcl.c
@@ -102,7 +102,6 @@ from The Open Group.
/* Types of local connections supported:
* - PTS
* - named pipes
- * - ISC
* - SCO
*/
#if !defined(sun)
@@ -163,6 +162,7 @@ TRANS(FillAddrInfo)(XtransConnInfo ciptr, char *sun_path, char *peer_sun_path)
if (strlen(sun_path) > sizeof(sunaddr->sun_path) - 1) {
PRMSG(1, "FillAddrInfo: path too long\n", 0, 0, 0);
+ xfree((char *) sunaddr);
return 0;
}
strcpy (sunaddr->sun_path, sun_path);
@@ -190,6 +190,7 @@ TRANS(FillAddrInfo)(XtransConnInfo ciptr, char *sun_path, char *peer_sun_path)
if (strlen(peer_sun_path) > sizeof(p_sunaddr->sun_path) - 1) {
PRMSG(1, "FillAddrInfo: peer path too long\n", 0, 0, 0);
+ xfree((char *) p_sunaddr);
return 0;
}
strcpy (p_sunaddr->sun_path, peer_sun_path);
@@ -248,11 +249,6 @@ static void _dummy(int sig)
#else
#define NAMEDNODENAME "/dev/X/Nserver."
-/*
- * ISC is only defined for X11 since they are there for
- * backwards binary compatability only.
- */
-
#define SCORNODENAME "/dev/X%1sR"
#define SCOSNODENAME "/dev/X%1sS"
#endif /* !sun */
@@ -352,6 +348,7 @@ TRANS(PTSOpenClient)(XtransConnInfo ciptr, char *port)
if ((fd = open(DEV_PTMX, O_RDWR)) < 0) {
PRMSG(1,"PTSOpenClient: failed to open %s\n", DEV_PTMX, 0,0);
+ close(server);
return(-1);
}
@@ -933,7 +930,7 @@ TRANS(NAMEDAccept)(XtransConnInfo ciptr, XtransConnInfo newciptr, int *status)
#if defined(LOCAL_TRANS_SCO)
/*
- * connect_spipe is used by the SCO and ISC connection types.
+ * connect_spipe is used by the SCO connection type.
*/
static int
connect_spipe(int fd1, int fd2)
@@ -958,7 +955,7 @@ connect_spipe(int fd1, int fd2)
}
/*
- * named_spipe is used by the SCO and ISC connection types.
+ * named_spipe is used by the SCO connection type.
*/
static int
@@ -1126,6 +1123,10 @@ TRANS(SCOOpenServer)(XtransConnInfo ciptr, char *port)
if ((fds = open(DEV_SPX, O_RDWR)) < 0 ||
(fdr = open(DEV_SPX, O_RDWR)) < 0 ) {
PRMSG(1,"SCOOpenServer: failed to open %s\n", DEV_SPX, 0,0 );
+ if (fds >= 0)
+ close(fds);
+ if (fdr >= 0)
+ close(fdr);
return -1;
}
@@ -1165,7 +1166,7 @@ TRANS(SCOOpenServer)(XtransConnInfo ciptr, char *port)
}
fdr = open (serverR_path, O_RDWR | O_NDELAY);
- if (fds < 0) {
+ if (fdr < 0) {
PRMSG(1,"SCOOpenServer: failed to open %s\n", serverR_path, 0, 0);
close (fds);
return -1;
@@ -1668,7 +1669,7 @@ static char *freeXLOCAL=NULL;
#elif defined(sun)
#define DEF_XLOCAL "UNIX:NAMED"
#else
-#define DEF_XLOCAL "UNIX:PTS:NAMED:ISC:SCO"
+#define DEF_XLOCAL "UNIX:PTS:NAMED:SCO"
#endif
static void
diff --git a/lib/libxtrans/Xtranssock.c b/lib/libxtrans/Xtranssock.c
index 18bbc5b09..e32e62a31 100644
--- a/lib/libxtrans/Xtranssock.c
+++ b/lib/libxtrans/Xtranssock.c
@@ -1,7 +1,28 @@
/*
+ * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/*
Copyright 1993, 1994, 1998 The Open Group
-Copyright 2002 Sun Microsystems, Inc. All rights reserved.
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
diff --git a/lib/libxtrans/aclocal.m4 b/lib/libxtrans/aclocal.m4
index 6bc0d8f47..d24c77a27 100644
--- a/lib/libxtrans/aclocal.m4
+++ b/lib/libxtrans/aclocal.m4
@@ -11,6 +11,164 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+#
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists. Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$PKG_CONFIG"; then
+ if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ else
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+ [pkg_failed=yes])
+ fi
+else
+ pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT
+])],
+ [AC_MSG_RESULT([no])
+ $4])
+elif test $pkg_failed = untried; then
+ ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
+ [$4])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
+
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
@@ -827,32 +985,26 @@ AC_SUBST([am__untar])
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
dnl
-dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
+dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
-dnl copy of this software and associated documentation files (the
-dnl "Software"), to deal in the Software without restriction, including
-dnl without limitation the rights to use, copy, modify, merge, publish,
-dnl distribute, and/or sell copies of the Software, and to permit persons
-dnl to whom the Software is furnished to do so, provided that the above
-dnl copyright notice(s) and this permission notice appear in all copies of
-dnl the Software and that both the above copyright notice(s) and this
-dnl permission notice appear in supporting documentation.
+dnl copy of this software and associated documentation files (the "Software"),
+dnl to deal in the Software without restriction, including without limitation
+dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
+dnl and/or sell copies of the Software, and to permit persons to whom the
+dnl Software is furnished to do so, subject to the following conditions:
dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
-dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
-dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
-dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+dnl The above copyright notice and this permission notice (including the next
+dnl paragraph) shall be included in all copies or substantial portions of the
+dnl Software.
dnl
-dnl Except as contained in this notice, the name of a copyright holder
-dnl shall not be used in advertising or otherwise to promote the sale, use
-dnl or other dealings in this Software without prior written authorization
-dnl of the copyright holder.
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+dnl DEALINGS IN THE SOFTWARE.
# XORG_MACROS_VERSION(required-version)
# -------------------------------------
@@ -870,7 +1022,7 @@ dnl of the copyright holder.
# See the "minimum version" comment for each macro you use to see what
# version you require.
m4_defun([XORG_MACROS_VERSION],[
-m4_define([vers_have], [1.3.0])
+m4_define([vers_have], [1.11.0])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,,
@@ -938,9 +1090,12 @@ AC_SUBST(RAWCPPFLAGS)
# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
# Not sure if there's any better way than just hardcoding by OS name.
# Override default settings by setting environment variables
+# Added MAN_SUBSTS in version 1.8
+# Added AC_PROG_SED in version 1.8
AC_DEFUN([XORG_MANPAGE_SECTIONS],[
AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_SED])
if test x$APP_MAN_SUFFIX = x ; then
APP_MAN_SUFFIX=1
@@ -1009,8 +1164,60 @@ AC_SUBST([FILE_MAN_DIR])
AC_SUBST([MISC_MAN_DIR])
AC_SUBST([DRIVER_MAN_DIR])
AC_SUBST([ADMIN_MAN_DIR])
+
+XORG_MAN_PAGE="X Version 11"
+AC_SUBST([XORG_MAN_PAGE])
+MAN_SUBSTS="\
+ -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+ -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+ -e 's|__xservername__|Xorg|g' \
+ -e 's|__xconfigfile__|xorg.conf|g' \
+ -e 's|__projectroot__|\$(prefix)|g' \
+ -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+ -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+ -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+ -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+ -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+ -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+ -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+AC_SUBST([MAN_SUBSTS])
+
]) # XORG_MANPAGE_SECTIONS
+# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
+# ------------------------
+# Minimum version: 1.7.0
+#
+# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
+# provided by xorg-sgml-doctools, if installed.
+AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
+AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
+XORG_SGML_PATH=
+PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
+ [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
+ [m4_ifval([$1],[:],
+ [if test x"$cross_compiling" != x"yes" ; then
+ AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
+ [XORG_SGML_PATH=$prefix/share/sgml])
+ fi])
+ ])
+
+# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
+# the path and the name of the doc stylesheet
+if test "x$XORG_SGML_PATH" != "x" ; then
+ AC_MSG_RESULT([$XORG_SGML_PATH])
+ STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
+ XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
+else
+ AC_MSG_RESULT([no])
+fi
+
+AC_SUBST(XORG_SGML_PATH)
+AC_SUBST(STYLESHEET_SRCDIR)
+AC_SUBST(XSL_STYLESHEET)
+AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
+]) # XORG_CHECK_SGML_DOCTOOLS
+
# XORG_CHECK_LINUXDOC
# -------------------
# Minimum version: 1.0.0
@@ -1020,23 +1227,14 @@ AC_SUBST([ADMIN_MAN_DIR])
# Whether or not the necessary tools and files are found can be checked
# with the AM_CONDITIONAL "BUILD_LINUXDOC"
AC_DEFUN([XORG_CHECK_LINUXDOC],[
-if test x$XORG_SGML_PATH = x ; then
- XORG_SGML_PATH=$prefix/share/sgml
-fi
-HAVE_DEFS_ENT=
-
-if test x"$cross_compiling" = x"yes" ; then
- HAVE_DEFS_ENT=no
-else
- AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
-fi
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+AC_REQUIRE([XORG_WITH_PS2PDF])
AC_PATH_PROG(LINUXDOC, linuxdoc)
-AC_PATH_PROG(PS2PDF, ps2pdf)
-AC_MSG_CHECKING([Whether to build documentation])
+AC_MSG_CHECKING([whether to build documentation])
-if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
+if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
BUILDDOC=yes
else
BUILDDOC=no
@@ -1046,9 +1244,9 @@ AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
AC_MSG_RESULT([$BUILDDOC])
-AC_MSG_CHECKING([Whether to build pdf documentation])
+AC_MSG_CHECKING([whether to build pdf documentation])
-if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
+if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
BUILDPDFDOC=yes
else
BUILDPDFDOC=no
@@ -1058,7 +1256,7 @@ AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
AC_MSG_RESULT([$BUILDPDFDOC])
-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
+MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
MAKE_PDF="$PS2PDF"
MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0"
@@ -1078,48 +1276,44 @@ AC_SUBST(MAKE_HTML)
# indicates whether the necessary tools and files are found and, if set,
# $(MAKE_XXX) blah.sgml will produce blah.xxx.
AC_DEFUN([XORG_CHECK_DOCBOOK],[
-if test x$XORG_SGML_PATH = x ; then
- XORG_SGML_PATH=$prefix/share/sgml
-fi
-HAVE_DEFS_ENT=
+AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
+
BUILDTXTDOC=no
BUILDPDFDOC=no
BUILDPSDOC=no
BUILDHTMLDOC=no
-AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
-
AC_PATH_PROG(DOCBOOKPS, docbook2ps)
AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
AC_PATH_PROG(DOCBOOKHTML, docbook2html)
AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
-AC_MSG_CHECKING([Whether to build text documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
+AC_MSG_CHECKING([whether to build text documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
test x$BUILD_TXTDOC != xno; then
BUILDTXTDOC=yes
fi
AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
AC_MSG_RESULT([$BUILDTXTDOC])
-AC_MSG_CHECKING([Whether to build PDF documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
+AC_MSG_CHECKING([whether to build PDF documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
test x$BUILD_PDFDOC != xno; then
BUILDPDFDOC=yes
fi
AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
AC_MSG_RESULT([$BUILDPDFDOC])
-AC_MSG_CHECKING([Whether to build PostScript documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
+AC_MSG_CHECKING([whether to build PostScript documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
test x$BUILD_PSDOC != xno; then
BUILDPSDOC=yes
fi
AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
AC_MSG_RESULT([$BUILDPSDOC])
-AC_MSG_CHECKING([Whether to build HTML documentation])
-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
+AC_MSG_CHECKING([whether to build HTML documentation])
+if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
test x$BUILD_HTMLDOC != xno; then
BUILDHTMLDOC=yes
fi
@@ -1137,6 +1331,548 @@ AC_SUBST(MAKE_PDF)
AC_SUBST(MAKE_HTML)
]) # XORG_CHECK_DOCBOOK
+# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
+# ----------------
+# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-xmlto option, it allows maximum flexibilty in making decisions
+# as whether or not to use the xmlto package. When DEFAULT is not specified,
+# --with-xmlto assumes 'auto'.
+#
+# Interface to module:
+# HAVE_XMLTO: used in makefiles to conditionally generate documentation
+# XMLTO: returns the path of the xmlto program found
+# returns the path set by the user in the environment
+# --with-xmlto: 'yes' user instructs the module to use xmlto
+# 'no' user instructs the module not to use xmlto
+#
+# Added in version 1.10.0
+# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
+# xmlto for text output requires either lynx, links, or w3m browsers
+#
+# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_XMLTO],[
+AC_ARG_VAR([XMLTO], [Path to xmlto command])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(xmlto,
+ AS_HELP_STRING([--with-xmlto],
+ [Use xmlto to regenerate documentation (default: ]_defopt[)]),
+ [use_xmlto=$withval], [use_xmlto=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_xmlto" = x"auto"; then
+ AC_PATH_PROG([XMLTO], [xmlto])
+ if test "x$XMLTO" = "x"; then
+ AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
+ have_xmlto=no
+ else
+ have_xmlto=yes
+ fi
+elif test "x$use_xmlto" = x"yes" ; then
+ AC_PATH_PROG([XMLTO], [xmlto])
+ if test "x$XMLTO" = "x"; then
+ AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
+ fi
+ have_xmlto=yes
+elif test "x$use_xmlto" = x"no" ; then
+ if test "x$XMLTO" != "x"; then
+ AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
+ fi
+ have_xmlto=no
+else
+ AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
+fi
+
+# Test for a minimum version of xmlto, if provided.
+m4_ifval([$1],
+[if test "$have_xmlto" = yes; then
+ # scrape the xmlto version
+ AC_MSG_CHECKING([the xmlto version])
+ xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
+ AC_MSG_RESULT([$xmlto_version])
+ AS_VERSION_COMPARE([$xmlto_version], [$1],
+ [if test "x$use_xmlto" = xauto; then
+ AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
+ have_xmlto=no
+ else
+ AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
+ fi])
+fi])
+
+# Test for the ability of xmlto to generate a text target
+have_xmlto_text=no
+cat > conftest.xml << "EOF"
+EOF
+AS_IF([test "$have_xmlto" = yes],
+ [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
+ [have_xmlto_text=yes],
+ [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
+rm -f conftest.xml
+AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
+AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
+]) # XORG_WITH_XMLTO
+
+# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
+# ----------------
+# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-asciidoc option, it allows maximum flexibilty in making decisions
+# as whether or not to use the asciidoc package. When DEFAULT is not specified,
+# --with-asciidoc assumes 'auto'.
+#
+# Interface to module:
+# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
+# ASCIIDOC: returns the path of the asciidoc program found
+# returns the path set by the user in the environment
+# --with-asciidoc: 'yes' user instructs the module to use asciidoc
+# 'no' user instructs the module not to use asciidoc
+#
+# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_ASCIIDOC],[
+AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(asciidoc,
+ AS_HELP_STRING([--with-asciidoc],
+ [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
+ [use_asciidoc=$withval], [use_asciidoc=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_asciidoc" = x"auto"; then
+ AC_PATH_PROG([ASCIIDOC], [asciidoc])
+ if test "x$ASCIIDOC" = "x"; then
+ AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
+ have_asciidoc=no
+ else
+ have_asciidoc=yes
+ fi
+elif test "x$use_asciidoc" = x"yes" ; then
+ AC_PATH_PROG([ASCIIDOC], [asciidoc])
+ if test "x$ASCIIDOC" = "x"; then
+ AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
+ fi
+ have_asciidoc=yes
+elif test "x$use_asciidoc" = x"no" ; then
+ if test "x$ASCIIDOC" != "x"; then
+ AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
+ fi
+ have_asciidoc=no
+else
+ AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
+fi
+m4_ifval([$1],
+[if test "$have_asciidoc" = yes; then
+ # scrape the asciidoc version
+ AC_MSG_CHECKING([the asciidoc version])
+ asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
+ AC_MSG_RESULT([$asciidoc_version])
+ AS_VERSION_COMPARE([$asciidoc_version], [$1],
+ [if test "x$use_asciidoc" = xauto; then
+ AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
+ have_asciidoc=no
+ else
+ AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
+ fi])
+fi])
+AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
+]) # XORG_WITH_ASCIIDOC
+
+# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
+# --------------------------------
+# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-doxygen option, it allows maximum flexibilty in making decisions
+# as whether or not to use the doxygen package. When DEFAULT is not specified,
+# --with-doxygen assumes 'auto'.
+#
+# Interface to module:
+# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
+# DOXYGEN: returns the path of the doxygen program found
+# returns the path set by the user in the environment
+# --with-doxygen: 'yes' user instructs the module to use doxygen
+# 'no' user instructs the module not to use doxygen
+#
+# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_DOXYGEN],[
+AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(doxygen,
+ AS_HELP_STRING([--with-doxygen],
+ [Use doxygen to regenerate documentation (default: ]_defopt[)]),
+ [use_doxygen=$withval], [use_doxygen=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_doxygen" = x"auto"; then
+ AC_PATH_PROG([DOXYGEN], [doxygen])
+ if test "x$DOXYGEN" = "x"; then
+ AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
+ have_doxygen=no
+ else
+ have_doxygen=yes
+ fi
+elif test "x$use_doxygen" = x"yes" ; then
+ AC_PATH_PROG([DOXYGEN], [doxygen])
+ if test "x$DOXYGEN" = "x"; then
+ AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
+ fi
+ have_doxygen=yes
+elif test "x$use_doxygen" = x"no" ; then
+ if test "x$DOXYGEN" != "x"; then
+ AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
+ fi
+ have_doxygen=no
+else
+ AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
+fi
+m4_ifval([$1],
+[if test "$have_doxygen" = yes; then
+ # scrape the doxygen version
+ AC_MSG_CHECKING([the doxygen version])
+ doxygen_version=`$DOXYGEN --version 2>/dev/null`
+ AC_MSG_RESULT([$doxygen_version])
+ AS_VERSION_COMPARE([$doxygen_version], [$1],
+ [if test "x$use_doxygen" = xauto; then
+ AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
+ have_doxygen=no
+ else
+ AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
+ fi])
+fi])
+AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
+]) # XORG_WITH_DOXYGEN
+
+# XORG_WITH_GROFF([DEFAULT])
+# ----------------
+# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-groff option, it allows maximum flexibilty in making decisions
+# as whether or not to use the groff package. When DEFAULT is not specified,
+# --with-groff assumes 'auto'.
+#
+# Interface to module:
+# HAVE_GROFF: used in makefiles to conditionally generate documentation
+# HAVE_GROFF_MM: the memorandum macros (-mm) package
+# HAVE_GROFF_MS: the -ms macros package
+# GROFF: returns the path of the groff program found
+# returns the path set by the user in the environment
+# --with-groff: 'yes' user instructs the module to use groff
+# 'no' user instructs the module not to use groff
+#
+# Added in version 1.9.0:
+# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
+# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
+# psselect from the psutils package.
+# the ghostcript package. Refer to the grohtml man pages
+#
+# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
+#
+# OS and distros often splits groff in a basic and full package, the former
+# having the groff program and the later having devices, fonts and macros
+# Checking for the groff executable is not enough.
+#
+# If macros are missing, we cannot assume that groff is useless, so we don't
+# unset HAVE_GROFF or GROFF env variables.
+# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
+#
+AC_DEFUN([XORG_WITH_GROFF],[
+AC_ARG_VAR([GROFF], [Path to groff command])
+m4_define([_defopt], m4_default([$1], [auto]))
+AC_ARG_WITH(groff,
+ AS_HELP_STRING([--with-groff],
+ [Use groff to regenerate documentation (default: ]_defopt[)]),
+ [use_groff=$withval], [use_groff=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_groff" = x"auto"; then
+ AC_PATH_PROG([GROFF], [groff])
+ if test "x$GROFF" = "x"; then
+ AC_MSG_WARN([groff not found - documentation targets will be skipped])
+ have_groff=no
+ else
+ have_groff=yes
+ fi
+elif test "x$use_groff" = x"yes" ; then
+ AC_PATH_PROG([GROFF], [groff])
+ if test "x$GROFF" = "x"; then
+ AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
+ fi
+ have_groff=yes
+elif test "x$use_groff" = x"no" ; then
+ if test "x$GROFF" != "x"; then
+ AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
+ fi
+ have_groff=no
+else
+ AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
+fi
+
+# We have groff, test for the presence of the macro packages
+if test "x$have_groff" = x"yes"; then
+ AC_MSG_CHECKING([for ${GROFF} -ms macros])
+ if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
+ groff_ms_works=yes
+ else
+ groff_ms_works=no
+ fi
+ AC_MSG_RESULT([$groff_ms_works])
+ AC_MSG_CHECKING([for ${GROFF} -mm macros])
+ if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
+ groff_mm_works=yes
+ else
+ groff_mm_works=no
+ fi
+ AC_MSG_RESULT([$groff_mm_works])
+fi
+
+# We have groff, test for HTML dependencies, one command per package
+if test "x$have_groff" = x"yes"; then
+ AC_PATH_PROGS(GS_PATH, [gs gswin32c])
+ AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
+ AC_PATH_PROG(PSSELECT_PATH, [psselect])
+ if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
+ have_groff_html=yes
+ else
+ have_groff_html=no
+ AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
+ fi
+fi
+
+# Set Automake conditionals for Makefiles
+AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
+]) # XORG_WITH_GROFF
+
+# XORG_WITH_FOP([DEFAULT])
+# ----------------
+# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-fop option, it allows maximum flexibilty in making decisions
+# as whether or not to use the fop package. When DEFAULT is not specified,
+# --with-fop assumes 'auto'.
+#
+# Interface to module:
+# HAVE_FOP: used in makefiles to conditionally generate documentation
+# FOP: returns the path of the fop program found
+# returns the path set by the user in the environment
+# --with-fop: 'yes' user instructs the module to use fop
+# 'no' user instructs the module not to use fop
+#
+# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_FOP],[
+AC_ARG_VAR([FOP], [Path to fop command])
+m4_define([_defopt], m4_default([$1], [auto]))
+AC_ARG_WITH(fop,
+ AS_HELP_STRING([--with-fop],
+ [Use fop to regenerate documentation (default: ]_defopt[)]),
+ [use_fop=$withval], [use_fop=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_fop" = x"auto"; then
+ AC_PATH_PROG([FOP], [fop])
+ if test "x$FOP" = "x"; then
+ AC_MSG_WARN([fop not found - documentation targets will be skipped])
+ have_fop=no
+ else
+ have_fop=yes
+ fi
+elif test "x$use_fop" = x"yes" ; then
+ AC_PATH_PROG([FOP], [fop])
+ if test "x$FOP" = "x"; then
+ AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
+ fi
+ have_fop=yes
+elif test "x$use_fop" = x"no" ; then
+ if test "x$FOP" != "x"; then
+ AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
+ fi
+ have_fop=no
+else
+ AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
+fi
+AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
+]) # XORG_WITH_FOP
+
+# XORG_WITH_PS2PDF([DEFAULT])
+# ----------------
+# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
+# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
+# --with-ps2pdf assumes 'auto'.
+#
+# Interface to module:
+# HAVE_PS2PDF: used in makefiles to conditionally generate documentation
+# PS2PDF: returns the path of the ps2pdf program found
+# returns the path set by the user in the environment
+# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
+# 'no' user instructs the module not to use ps2pdf
+#
+# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_PS2PDF],[
+AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
+m4_define([_defopt], m4_default([$1], [auto]))
+AC_ARG_WITH(ps2pdf,
+ AS_HELP_STRING([--with-ps2pdf],
+ [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
+ [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_ps2pdf" = x"auto"; then
+ AC_PATH_PROG([PS2PDF], [ps2pdf])
+ if test "x$PS2PDF" = "x"; then
+ AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
+ have_ps2pdf=no
+ else
+ have_ps2pdf=yes
+ fi
+elif test "x$use_ps2pdf" = x"yes" ; then
+ AC_PATH_PROG([PS2PDF], [ps2pdf])
+ if test "x$PS2PDF" = "x"; then
+ AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
+ fi
+ have_ps2pdf=yes
+elif test "x$use_ps2pdf" = x"no" ; then
+ if test "x$PS2PDF" != "x"; then
+ AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
+ fi
+ have_ps2pdf=no
+else
+ AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
+fi
+AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
+]) # XORG_WITH_PS2PDF
+
+# XORG_ENABLE_DOCS (enable_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a builder to skip all
+# documentation targets except traditional man pages.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO --with-xmlto
+# XORG_WITH_ASCIIDOC --with-asciidoc
+# XORG_WITH_DOXYGEN --with-doxygen
+# XORG_WITH_FOP --with-fop
+# XORG_WITH_GROFF --with-groff
+# XORG_WITH_PS2PDF --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DOCS: used in makefiles to conditionally generate documentation
+# --enable-docs: 'yes' user instructs the module to generate docs
+# 'no' user instructs the module not to generate docs
+# parm1: specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DOCS],[
+m4_define([default], m4_default([$1], [yes]))
+AC_ARG_ENABLE(docs,
+ AS_HELP_STRING([--enable-docs],
+ [Enable building the documentation (default: ]default[)]),
+ [build_docs=$enableval], [build_docs=]default)
+m4_undefine([default])
+AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
+AC_MSG_CHECKING([whether to build documentation])
+AC_MSG_RESULT([$build_docs])
+]) # XORG_ENABLE_DOCS
+
+# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all developer documentation.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO --with-xmlto
+# XORG_WITH_ASCIIDOC --with-asciidoc
+# XORG_WITH_DOXYGEN --with-doxygen
+# XORG_WITH_FOP --with-fop
+# XORG_WITH_GROFF --with-groff
+# XORG_WITH_PS2PDF --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs
+# --enable-devel-docs: 'yes' user instructs the module to generate developer docs
+# 'no' user instructs the module not to generate developer docs
+# parm1: specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
+m4_define([devel_default], m4_default([$1], [yes]))
+AC_ARG_ENABLE(devel-docs,
+ AS_HELP_STRING([--enable-devel-docs],
+ [Enable building the developer documentation (default: ]devel_default[)]),
+ [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
+m4_undefine([devel_default])
+AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
+AC_MSG_CHECKING([whether to build developer documentation])
+AC_MSG_RESULT([$build_devel_docs])
+]) # XORG_ENABLE_DEVEL_DOCS
+
+# XORG_ENABLE_SPECS (enable_specs=yes)
+# ----------------
+# Minimum version: 1.6.0
+#
+# This macro enables a builder to skip all functional specification targets.
+# Combined with the specific tool checking macros XORG_WITH_*, it provides
+# maximum flexibilty in controlling documentation building.
+# Refer to:
+# XORG_WITH_XMLTO --with-xmlto
+# XORG_WITH_ASCIIDOC --with-asciidoc
+# XORG_WITH_DOXYGEN --with-doxygen
+# XORG_WITH_FOP --with-fop
+# XORG_WITH_GROFF --with-groff
+# XORG_WITH_PS2PDF --with-ps2pdf
+#
+# Interface to module:
+# ENABLE_SPECS: used in makefiles to conditionally generate specs
+# --enable-specs: 'yes' user instructs the module to generate specs
+# 'no' user instructs the module not to generate specs
+# parm1: specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_SPECS],[
+m4_define([spec_default], m4_default([$1], [yes]))
+AC_ARG_ENABLE(specs,
+ AS_HELP_STRING([--enable-specs],
+ [Enable building the specs (default: ]spec_default[)]),
+ [build_specs=$enableval], [build_specs=]spec_default)
+m4_undefine([spec_default])
+AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
+AC_MSG_CHECKING([whether to build functional specifications])
+AC_MSG_RESULT([$build_specs])
+]) # XORG_ENABLE_SPECS
+
# XORG_CHECK_MALLOC_ZERO
# ----------------------
# Minimum version: 1.0.0
@@ -1166,7 +1902,8 @@ main() {
exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
}],
[MALLOC_ZERO_RETURNS_NULL=yes],
- [MALLOC_ZERO_RETURNS_NULL=no])
+ [MALLOC_ZERO_RETURNS_NULL=no],
+ [MALLOC_ZERO_RETURNS_NULL=yes])
fi
AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
@@ -1189,38 +1926,69 @@ AC_SUBST([XTMALLOC_ZERO_CFLAGS])
# ----------------
# Minimum version: 1.1.0
#
-# Sets up flags for source checkers such as lint and sparse if --with-lint
-# is specified. (Use --with-lint=sparse for sparse.)
-# Sets $LINT to name of source checker passed with --with-lint (default: lint)
-# Sets $LINT_FLAGS to flags to pass to source checker
-# Sets LINT automake conditional if enabled (default: disabled)
+# This macro enables the use of a tool that flags some suspicious and
+# non-portable constructs (likely to be bugs) in C language source code.
+# It will attempt to locate the tool and use appropriate options.
+# There are various lint type tools on different platforms.
+#
+# Interface to module:
+# LINT: returns the path to the tool found on the platform
+# or the value set to LINT on the configure cmd line
+# also an Automake conditional
+# LINT_FLAGS: an Automake variable with appropriate flags
+#
+# --with-lint: 'yes' user instructs the module to use lint
+# 'no' user instructs the module not to use lint (default)
+#
+# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
+# If the user sets the value of LINT_FLAGS, they are used verbatim.
#
AC_DEFUN([XORG_WITH_LINT],[
-# Allow checking code with lint, sparse, etc.
+AC_ARG_VAR([LINT], [Path to a lint-style command])
+AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
[Use a lint-style source code checker (default: disabled)])],
[use_lint=$withval], [use_lint=no])
-if test "x$use_lint" = "xyes" ; then
- LINT="lint"
+
+# Obtain platform specific info like program name and options
+# The lint program on FreeBSD and NetBSD is different from the one on Solaris
+case $host_os in
+ *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
+ lint_name=splint
+ lint_options="-badflag"
+ ;;
+ *freebsd* | *netbsd*)
+ lint_name=lint
+ lint_options="-u -b"
+ ;;
+ *solaris*)
+ lint_name=lint
+ lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
+ ;;
+esac
+
+# Test for the presence of the program (either guessed by the code or spelled out by the user)
+if test "x$use_lint" = x"yes" ; then
+ AC_PATH_PROG([LINT], [$lint_name])
+ if test "x$LINT" = "x"; then
+ AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
+ fi
+elif test "x$use_lint" = x"no" ; then
+ if test "x$LINT" != "x"; then
+ AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
+ fi
else
- LINT="$use_lint"
+ AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
fi
-if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
- case $LINT in
- lint|*/lint)
- case $host_os in
- solaris*)
- LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
- ;;
- esac
- ;;
- esac
+
+# User supplied flags override default flags
+if test "x$LINT_FLAGS" != "x"; then
+ lint_options=$LINT_FLAGS
fi
-AC_SUBST(LINT)
-AC_SUBST(LINT_FLAGS)
-AM_CONDITIONAL(LINT, [test x$LINT != xno])
+AC_SUBST([LINT_FLAGS],[$lint_options])
+AM_CONDITIONAL(LINT, [test "x$LINT" != x])
]) # XORG_WITH_LINT
@@ -1230,28 +1998,29 @@ AM_CONDITIONAL(LINT, [test x$LINT != xno])
#
# Sets up flags for building lint libraries for checking programs that call
# functions in the library.
-# Disabled by default, enable with --enable-lint-library
-# Sets:
-# @LINTLIB@ - name of lint library file to make
-# MAKE_LINT_LIB - automake conditional
#
+# Interface to module:
+# LINTLIB - Automake variable with the name of lint library file to make
+# MAKE_LINT_LIB - Automake conditional
+#
+# --enable-lint-library: - 'yes' user instructs the module to created a lint library
+# - 'no' user instructs the module not to create a lint library (default)
AC_DEFUN([XORG_LINT_LIBRARY],[
AC_REQUIRE([XORG_WITH_LINT])
-# Build lint "library" for more indepth checks of programs calling this library
AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
[Create lint library (default: disabled)])],
[make_lint_lib=$enableval], [make_lint_lib=no])
-if test "x$make_lint_lib" != "xno" ; then
- if test "x$LINT" = "xno" ; then
- AC_MSG_ERROR([Cannot make lint library without --with-lint])
- fi
- if test "x$make_lint_lib" = "xyes" ; then
- LINTLIB=llib-l$1.ln
- else
- LINTLIB=$make_lint_lib
- fi
+
+if test "x$make_lint_lib" = x"yes" ; then
+ LINTLIB=llib-l$1.ln
+ if test "x$LINT" = "x"; then
+ AC_MSG_ERROR([Cannot make lint library without --with-lint])
+ fi
+elif test "x$make_lint_lib" != x"no" ; then
+ AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
fi
+
AC_SUBST(LINTLIB)
AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
@@ -1264,11 +2033,11 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
# Defines CWARNFLAGS to enable C compiler warnings.
#
AC_DEFUN([XORG_CWARNFLAGS], [
-AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AC_PROG_CC_C99])
if test "x$GCC" = xyes ; then
CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
--Wbad-function-cast"
+-Wbad-function-cast -Wformat=2"
case `$CC -dumpversion` in
3.4.* | 4.*)
CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
@@ -1281,7 +2050,6 @@ else
fi
fi
AC_SUBST(CWARNFLAGS)
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
]) # XORG_CWARNFLAGS
# XORG_STRICT_OPTION
@@ -1290,7 +2058,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
#
# Add configure option to enable strict compilation
AC_DEFUN([XORG_STRICT_OPTION], [
-AC_REQUIRE([AC_PROG_CC])
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
AC_REQUIRE([AC_PROG_CC_C99])
AC_REQUIRE([XORG_CWARNFLAGS])
@@ -1320,12 +2088,33 @@ AC_SUBST([CWARNFLAGS])
# Defines default options for X.Org modules.
#
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
+AC_REQUIRE([AC_PROG_INSTALL])
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_RELEASE_VERSION
XORG_CHANGELOG
+XORG_INSTALL
XORG_MANPAGE_SECTIONS
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
+ [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
]) # XORG_DEFAULT_OPTIONS
+
+# XORG_INSTALL()
+# ----------------
+# Minimum version: 1.4.0
+#
+# Defines the variable INSTALL_CMD as the command to copy
+# INSTALL from $prefix/share/util-macros.
+#
+AC_DEFUN([XORG_INSTALL], [
+AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+AC_SUBST([INSTALL_CMD])
+]) # XORG_INSTALL
dnl Copyright 2005 Red Hat, Inc
dnl
dnl Permission to use, copy, modify, distribute, and sell this software and its
@@ -1353,22 +2142,9 @@ dnl
# XORG_RELEASE_VERSION
# --------------------
-# Adds --with/without-release-string and changes the PACKAGE and
-# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If
-# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also
-# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
+# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
AC_DEFUN([XORG_RELEASE_VERSION],[
- AC_ARG_WITH(release-version,
- AS_HELP_STRING([--with-release-version=STRING],
- [Use release version string in package name]),
- [RELEASE_VERSION="$withval"],
- [RELEASE_VERSION=""])
- if test "x$RELEASE_VERSION" != "x"; then
- PACKAGE="$PACKAGE-$RELEASE_VERSION"
- PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
- AC_MSG_NOTICE([Building with package name set to $PACKAGE])
- fi
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
[`echo $PACKAGE_VERSION | cut -d . -f 1`],
[Major version of this package])
@@ -1395,13 +2171,12 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
# Defines the variable CHANGELOG_CMD as the command to generate
# ChangeLog from git.
#
-# Arrange that distcleancheck ignores ChangeLog left over by distclean.
#
AC_DEFUN([XORG_CHANGELOG], [
-CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
-mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
echo 'git directory not found: installing possibly empty changelog.' >&2)"
AC_SUBST([CHANGELOG_CMD])
-AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
]) # XORG_CHANGELOG
diff --git a/lib/libxtrans/configure b/lib/libxtrans/configure
index 6c8c23621..d572d97a8 100644
--- a/lib/libxtrans/configure
+++ b/lib/libxtrans/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.62 for xtrans 1.2.5.
+# Generated by GNU Autoconf 2.62 for xtrans 1.2.6.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@@ -572,6 +572,66 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+as_awk_strverscmp='
+ # Use only awk features that work with 7th edition Unix awk (1978).
+ # My, what an old awk you have, Mr. Solaris!
+ END {
+ while (length(v1) && length(v2)) {
+ # Set d1 to be the next thing to compare from v1, and likewise for d2.
+ # Normally this is a single character, but if v1 and v2 contain digits,
+ # compare them as integers and fractions as strverscmp does.
+ if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) {
+ # Split v1 and v2 into their leading digit string components d1 and d2,
+ # and advance v1 and v2 past the leading digit strings.
+ for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue
+ for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue
+ d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1)
+ d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1)
+ if (d1 ~ /^0/) {
+ if (d2 ~ /^0/) {
+ # Compare two fractions.
+ while (d1 ~ /^0/ && d2 ~ /^0/) {
+ d1 = substr(d1, 2); len1--
+ d2 = substr(d2, 2); len2--
+ }
+ if (len1 != len2 && ! (len1 && len2 && substr(d1, 1, 1) == substr(d2, 1, 1))) {
+ # The two components differ in length, and the common prefix
+ # contains only leading zeros. Consider the longer to be less.
+ d1 = -len1
+ d2 = -len2
+ } else {
+ # Otherwise, compare as strings.
+ d1 = "x" d1
+ d2 = "x" d2
+ }
+ } else {
+ # A fraction is less than an integer.
+ exit 1
+ }
+ } else {
+ if (d2 ~ /^0/) {
+ # An integer is greater than a fraction.
+ exit 2
+ } else {
+ # Compare two integers.
+ d1 += 0
+ d2 += 0
+ }
+ }
+ } else {
+ # The normal case, without worrying about digits.
+ d1 = substr(v1, 1, 1); v1 = substr(v1, 2)
+ d2 = substr(v2, 1, 1); v2 = substr(v2, 2)
+ }
+ if (d1 < d2) exit 1
+ if (d1 > d2) exit 2
+ }
+ # Beware Solaris /usr/xgp4/bin/awk (at least through Solaris 10),
+ # which mishandles some comparisons of empty strings to integers.
+ if (length(v2)) exit 1
+ if (length(v1)) exit 2
+ }
+'
exec 7<&0 </dev/null 6>&1
@@ -596,8 +656,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='xtrans'
PACKAGE_TARNAME='xtrans'
-PACKAGE_VERSION='1.2.5'
-PACKAGE_STRING='xtrans 1.2.5'
+PACKAGE_VERSION='1.2.6'
+PACKAGE_STRING='xtrans 1.2.6'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
# Factoring default headers for most tests.
@@ -718,7 +778,8 @@ GREP
EGREP
CWARNFLAGS
CHANGELOG_CMD
-distcleancheck_listfiles
+PKG_CONFIG
+INSTALL_CMD
build
build_cpu
build_vendor
@@ -727,6 +788,7 @@ host
host_cpu
host_vendor
host_os
+SED
APP_MAN_SUFFIX
LIB_MAN_SUFFIX
FILE_MAN_SUFFIX
@@ -739,14 +801,26 @@ FILE_MAN_DIR
MISC_MAN_DIR
DRIVER_MAN_DIR
ADMIN_MAN_DIR
+XORG_MAN_PAGE
+MAN_SUBSTS
+AM_DEFAULT_VERBOSITY
+ENABLE_DOCS_TRUE
+ENABLE_DOCS_FALSE
+XMLTO
+HAVE_XMLTO_TEXT_TRUE
+HAVE_XMLTO_TEXT_FALSE
+HAVE_XMLTO_TRUE
+HAVE_XMLTO_FALSE
+FOP
+HAVE_FOP_TRUE
+HAVE_FOP_FALSE
+XORG_SGML_PATH
+STYLESHEET_SRCDIR
+XSL_STYLESHEET
+HAVE_STYLESHEETS_TRUE
+HAVE_STYLESHEETS_FALSE
fchown_define
sticky_bit_define
-GROFF
-PS2PDF
-BUILD_DOCS_TRUE
-BUILD_DOCS_FALSE
-HAVE_PS2PDF_TRUE
-HAVE_PS2PDF_FALSE
LIBOBJS
LTLIBOBJS'
ac_subst_files=''
@@ -755,8 +829,9 @@ enable_option_checking
enable_maintainer_mode
enable_dependency_tracking
enable_strict_compilation
-with_release_version
enable_docs
+with_xmlto
+with_fop
'
ac_precious_vars='build_alias
host_alias
@@ -766,7 +841,10 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP'
+CPP
+PKG_CONFIG
+XMLTO
+FOP'
# Initialize some variables set by options.
@@ -1319,7 +1397,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures xtrans 1.2.5 to adapt to many kinds of systems.
+\`configure' configures xtrans 1.2.6 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1389,7 +1467,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of xtrans 1.2.5:";;
+ short | recursive ) echo "Configuration of xtrans 1.2.6:";;
esac
cat <<\_ACEOF
@@ -1404,13 +1482,14 @@ Optional Features:
--enable-strict-compilation
Enable all warnings from compiler and make them
errors (default: disabled)
- --enable-docs Enable building of documentation
+ --enable-docs Enable building the documentation (yes: yes)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-release-version=STRING
- Use release version string in package name
+ --with-xmlto Use xmlto to regenerate documentation (default:
+ auto)
+ --with-fop Use fop to regenerate documentation (default: auto)
Some influential environment variables:
CC C compiler command
@@ -1421,6 +1500,9 @@ Some influential environment variables:
CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
+ PKG_CONFIG path to pkg-config utility
+ XMLTO Path to xmlto command
+ FOP Path to fop command
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -1488,7 +1570,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-xtrans configure 1.2.5
+xtrans configure 1.2.6
generated by GNU Autoconf 2.62
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1502,7 +1584,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by xtrans $as_me 1.2.5, which was
+It was created by xtrans $as_me 1.2.6, which was
generated by GNU Autoconf 2.62. Invocation command line was
$ $0 $@
@@ -2151,7 +2233,7 @@ fi
# Define the identity of the package.
PACKAGE='xtrans'
- VERSION='1.2.5'
+ VERSION='1.2.6'
cat >>confdefs.h <<_ACEOF
@@ -2322,7 +2404,7 @@ fi
-# Require xorg-macros 1.3 or later: XORG_DEFAULT_OPTIONS
+# Require xorg-macros minimum of 1.10 for DocBook XML documentation
@@ -3439,6 +3521,208 @@ else
fi
+ { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if test "${ac_cv_prog_cc_c99+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+ your preprocessor is broken;
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\0'; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static void
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str;
+ int number;
+ float fnumber;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case 's': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case 'd': // int
+ number = va_arg (args_copy, int);
+ break;
+ case 'f': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+}
+
+int
+main ()
+{
+
+ // Check bool.
+ _Bool success = false;
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ test_varargs ("s, d' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+ || dynamic_array[ni.number - 1] != 543);
+
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_c99=$ac_arg
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" in
+ x)
+ { $as_echo "$as_me:$LINENO: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:$LINENO: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c99"
+ { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+
+
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -4059,208 +4343,126 @@ fi
done
- { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C99" >&5
-$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
-if test "${ac_cv_prog_cc_c99+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c99=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <stdio.h>
-
-// Check varargs macros. These examples are taken from C99 6.10.3.5.
-#define debug(...) fprintf (stderr, __VA_ARGS__)
-#define showlist(...) puts (#__VA_ARGS__)
-#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
-static void
-test_varargs_macros (void)
-{
- int x = 1234;
- int y = 5678;
- debug ("Flag");
- debug ("X = %d\n", x);
- showlist (The first, second, and third items.);
- report (x>y, "x is %d but y is %d", x, y);
-}
-
-// Check long long types.
-#define BIG64 18446744073709551615ull
-#define BIG32 4294967295ul
-#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
-#if !BIG_OK
- your preprocessor is broken;
-#endif
-#if BIG_OK
-#else
- your preprocessor is broken;
-#endif
-static long long int bignum = -9223372036854775807LL;
-static unsigned long long int ubignum = BIG64;
-
-struct incomplete_array
-{
- int datasize;
- double data[];
-};
-
-struct named_init {
- int number;
- const wchar_t *name;
- double average;
-};
-typedef const char *ccp;
-
-static inline int
-test_restrict (ccp restrict text)
-{
- // See if C++-style comments work.
- // Iterate through items via the restricted pointer.
- // Also check for declarations in for loops.
- for (unsigned int i = 0; *(text+i) != '\0'; ++i)
- continue;
- return 0;
-}
-
-// Check varargs and va_copy.
-static void
-test_varargs (const char *format, ...)
-{
- va_list args;
- va_start (args, format);
- va_list args_copy;
- va_copy (args_copy, args);
-
- const char *str;
- int number;
- float fnumber;
-
- while (*format)
- {
- switch (*format++)
- {
- case 's': // string
- str = va_arg (args_copy, const char *);
- break;
- case 'd': // int
- number = va_arg (args_copy, int);
- break;
- case 'f': // float
- fnumber = va_arg (args_copy, double);
- break;
- default:
- break;
- }
- }
- va_end (args_copy);
- va_end (args);
-}
-
-int
-main ()
-{
- // Check bool.
- _Bool success = false;
-
- // Check restrict.
- if (test_restrict ("String literal") == 0)
- success = true;
- char *restrict newvar = "Another string";
-
- // Check varargs.
- test_varargs ("s, d' f .", "string", 65, 34.234);
- test_varargs_macros ();
-
- // Check flexible array members.
- struct incomplete_array *ia =
- malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
- ia->datasize = 10;
- for (int i = 0; i < ia->datasize; ++i)
- ia->data[i] = i * 1.234;
-
- // Check named initializers.
- struct named_init ni = {
- .number = 34,
- .name = L"Test wide string",
- .average = 543.34343,
- };
-
- ni.number = 58;
-
- int dynamic_array[ni.number];
- dynamic_array[ni.number - 1] = 543;
-
- // work around unused variable warnings
- return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
- || dynamic_array[ni.number - 1] != 543);
-
- ;
- return 0;
-}
-_ACEOF
-for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cc_c99=$ac_arg
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c99" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c99" in
- x)
- { $as_echo "$as_me:$LINENO: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:$LINENO: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
*)
- CC="$CC $ac_cv_prog_cc_c99"
- { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c99" >&5
-$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.9.0
+ { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ PKG_CONFIG=""
+ fi
+fi
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
{ { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
@@ -4344,13 +4546,85 @@ IFS=$ac_save_IFS
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if test "${ac_cv_path_SED+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ $as_unset ac_script || ac_script=
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5
+$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+
if test "x$GCC" = xyes ; then
CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
--Wbad-function-cast"
+-Wbad-function-cast -Wformat=2"
case `$CC -dumpversion` in
3.4.* | 4.*)
CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
@@ -4423,8 +4697,7 @@ fi
-
-
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
@@ -4567,20 +4840,6 @@ CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
-# Check whether --with-release-version was given.
-if test "${with_release_version+set}" = set; then
- withval=$with_release_version; RELEASE_VERSION="$withval"
-else
- RELEASE_VERSION=""
-fi
-
- if test "x$RELEASE_VERSION" != "x"; then
- PACKAGE="$PACKAGE-$RELEASE_VERSION"
- PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
- { $as_echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
-$as_echo "$as_me: Building with package name set to $PACKAGE" >&6;}
- fi
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
_ACEOF
@@ -4605,11 +4864,20 @@ _ACEOF
-CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
-mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
+CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
+|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
echo 'git directory not found: installing possibly empty changelog.' >&2)"
-distcleancheck_listfiles='find . -type f ! -name ChangeLog -print'
+
+
+
+macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
+INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
+mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
+echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+
@@ -4683,6 +4951,405 @@ fi
+XORG_MAN_PAGE="X Version 11"
+
+MAN_SUBSTS="\
+ -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+ -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
+ -e 's|__xservername__|Xorg|g' \
+ -e 's|__xconfigfile__|xorg.conf|g' \
+ -e 's|__projectroot__|\$(prefix)|g' \
+ -e 's|__apploaddir__|\$(appdefaultdir)|g' \
+ -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
+ -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
+ -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
+ -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
+ -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
+ -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
+
+
+
+AM_DEFAULT_VERBOSITY=1
+
+
+
+
+# Check whether --enable-docs was given.
+if test "${enable_docs+set}" = set; then
+ enableval=$enable_docs; build_docs=$enableval
+else
+ build_docs=yes
+fi
+
+
+
+
+if test x$build_docs = xyes; then
+ ENABLE_DOCS_TRUE=
+ ENABLE_DOCS_FALSE='#'
+else
+ ENABLE_DOCS_TRUE='#'
+ ENABLE_DOCS_FALSE=
+fi
+
+{ $as_echo "$as_me:$LINENO: checking whether to build documentation" >&5
+$as_echo_n "checking whether to build documentation... " >&6; }
+{ $as_echo "$as_me:$LINENO: result: $build_docs" >&5
+$as_echo "$build_docs" >&6; }
+
+
+
+
+
+# Check whether --with-xmlto was given.
+if test "${with_xmlto+set}" = set; then
+ withval=$with_xmlto; use_xmlto=$withval
+else
+ use_xmlto=auto
+fi
+
+
+
+if test "x$use_xmlto" = x"auto"; then
+ # Extract the first word of "xmlto", so it can be a program name with args.
+set dummy xmlto; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_XMLTO+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $XMLTO in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XMLTO="$XMLTO" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_XMLTO="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+XMLTO=$ac_cv_path_XMLTO
+if test -n "$XMLTO"; then
+ { $as_echo "$as_me:$LINENO: result: $XMLTO" >&5
+$as_echo "$XMLTO" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test "x$XMLTO" = "x"; then
+ { $as_echo "$as_me:$LINENO: WARNING: xmlto not found - documentation targets will be skipped" >&5
+$as_echo "$as_me: WARNING: xmlto not found - documentation targets will be skipped" >&2;}
+ have_xmlto=no
+ else
+ have_xmlto=yes
+ fi
+elif test "x$use_xmlto" = x"yes" ; then
+ # Extract the first word of "xmlto", so it can be a program name with args.
+set dummy xmlto; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_XMLTO+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $XMLTO in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XMLTO="$XMLTO" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_XMLTO="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+XMLTO=$ac_cv_path_XMLTO
+if test -n "$XMLTO"; then
+ { $as_echo "$as_me:$LINENO: result: $XMLTO" >&5
+$as_echo "$XMLTO" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test "x$XMLTO" = "x"; then
+ { { $as_echo "$as_me:$LINENO: error: --with-xmlto=yes specified but xmlto not found in PATH" >&5
+$as_echo "$as_me: error: --with-xmlto=yes specified but xmlto not found in PATH" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ have_xmlto=yes
+elif test "x$use_xmlto" = x"no" ; then
+ if test "x$XMLTO" != "x"; then
+ { $as_echo "$as_me:$LINENO: WARNING: ignoring XMLTO environment variable since --with-xmlto=no was specified" >&5
+$as_echo "$as_me: WARNING: ignoring XMLTO environment variable since --with-xmlto=no was specified" >&2;}
+ fi
+ have_xmlto=no
+else
+ { { $as_echo "$as_me:$LINENO: error: --with-xmlto expects 'yes' or 'no'" >&5
+$as_echo "$as_me: error: --with-xmlto expects 'yes' or 'no'" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# Test for a minimum version of xmlto, if provided.
+if test "$have_xmlto" = yes; then
+ # scrape the xmlto version
+ { $as_echo "$as_me:$LINENO: checking the xmlto version" >&5
+$as_echo_n "checking the xmlto version... " >&6; }
+ xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
+ { $as_echo "$as_me:$LINENO: result: $xmlto_version" >&5
+$as_echo "$xmlto_version" >&6; }
+ as_arg_v1=$xmlto_version
+as_arg_v2=0.0.20
+awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
+case $? in
+1) if test "x$use_xmlto" = xauto; then
+ { $as_echo "$as_me:$LINENO: WARNING: xmlto version $xmlto_version found, but 0.0.20 needed" >&5
+$as_echo "$as_me: WARNING: xmlto version $xmlto_version found, but 0.0.20 needed" >&2;}
+ have_xmlto=no
+ else
+ { { $as_echo "$as_me:$LINENO: error: xmlto version $xmlto_version found, but 0.0.20 needed" >&5
+$as_echo "$as_me: error: xmlto version $xmlto_version found, but 0.0.20 needed" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+0) ;;
+2) ;;
+esac
+fi
+
+# Test for the ability of xmlto to generate a text target
+have_xmlto_text=no
+cat > conftest.xml << "EOF"
+EOF
+if test "$have_xmlto" = yes; then
+ if $XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1; then
+ have_xmlto_text=yes
+else
+ { $as_echo "$as_me:$LINENO: WARNING: xmlto cannot generate text format, this format skipped" >&5
+$as_echo "$as_me: WARNING: xmlto cannot generate text format, this format skipped" >&2;}
+fi
+
+fi
+
+rm -f conftest.xml
+
+
+if test $have_xmlto_text = yes; then
+ HAVE_XMLTO_TEXT_TRUE=
+ HAVE_XMLTO_TEXT_FALSE='#'
+else
+ HAVE_XMLTO_TEXT_TRUE='#'
+ HAVE_XMLTO_TEXT_FALSE=
+fi
+
+
+
+if test "$have_xmlto" = yes; then
+ HAVE_XMLTO_TRUE=
+ HAVE_XMLTO_FALSE='#'
+else
+ HAVE_XMLTO_TRUE='#'
+ HAVE_XMLTO_FALSE=
+fi
+
+
+
+
+
+
+# Check whether --with-fop was given.
+if test "${with_fop+set}" = set; then
+ withval=$with_fop; use_fop=$withval
+else
+ use_fop=auto
+fi
+
+
+
+if test "x$use_fop" = x"auto"; then
+ # Extract the first word of "fop", so it can be a program name with args.
+set dummy fop; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_FOP+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $FOP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+FOP=$ac_cv_path_FOP
+if test -n "$FOP"; then
+ { $as_echo "$as_me:$LINENO: result: $FOP" >&5
+$as_echo "$FOP" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test "x$FOP" = "x"; then
+ { $as_echo "$as_me:$LINENO: WARNING: fop not found - documentation targets will be skipped" >&5
+$as_echo "$as_me: WARNING: fop not found - documentation targets will be skipped" >&2;}
+ have_fop=no
+ else
+ have_fop=yes
+ fi
+elif test "x$use_fop" = x"yes" ; then
+ # Extract the first word of "fop", so it can be a program name with args.
+set dummy fop; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_FOP+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $FOP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+FOP=$ac_cv_path_FOP
+if test -n "$FOP"; then
+ { $as_echo "$as_me:$LINENO: result: $FOP" >&5
+$as_echo "$FOP" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test "x$FOP" = "x"; then
+ { { $as_echo "$as_me:$LINENO: error: --with-fop=yes specified but fop not found in PATH" >&5
+$as_echo "$as_me: error: --with-fop=yes specified but fop not found in PATH" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ have_fop=yes
+elif test "x$use_fop" = x"no" ; then
+ if test "x$FOP" != "x"; then
+ { $as_echo "$as_me:$LINENO: WARNING: ignoring FOP environment variable since --with-fop=no was specified" >&5
+$as_echo "$as_me: WARNING: ignoring FOP environment variable since --with-fop=no was specified" >&2;}
+ fi
+ have_fop=no
+else
+ { { $as_echo "$as_me:$LINENO: error: --with-fop expects 'yes' or 'no'" >&5
+$as_echo "$as_me: error: --with-fop expects 'yes' or 'no'" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+if test "$have_fop" = yes; then
+ HAVE_FOP_TRUE=
+ HAVE_FOP_FALSE='#'
+else
+ HAVE_FOP_TRUE='#'
+ HAVE_FOP_FALSE=
+fi
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for X.Org SGML entities >= 1.5" >&5
+$as_echo_n "checking for X.Org SGML entities >= 1.5... " >&6; }
+XORG_SGML_PATH=
+if test -n "$PKG_CONFIG" && \
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xorg-sgml-doctools >= 1.5\"") >&5
+ ($PKG_CONFIG --exists --print-errors "xorg-sgml-doctools >= 1.5") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`
+else
+ :
+
+fi
+
+# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
+# the path and the name of the doc stylesheet
+if test "x$XORG_SGML_PATH" != "x" ; then
+ { $as_echo "$as_me:$LINENO: result: $XORG_SGML_PATH" >&5
+$as_echo "$XORG_SGML_PATH" >&6; }
+ STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
+ XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+
+if test "x$XSL_STYLESHEET" != "x"; then
+ HAVE_STYLESHEETS_TRUE=
+ HAVE_STYLESHEETS_FALSE='#'
+else
+ HAVE_STYLESHEETS_TRUE='#'
+ HAVE_STYLESHEETS_FALSE=
+fi
+
# Because xtrans is included into other modules rather than being linked
@@ -4793,141 +5460,7 @@ sticky_bit_define="-DHAS_STICKY_DIR_BIT"
-# Documentation is currently provided in troff format, built on request
-for ac_prog in groff
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GROFF+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- case $GROFF in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_GROFF="$GROFF" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/gnu/bin"
-for as_dir in $as_dummy
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_GROFF="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-GROFF=$ac_cv_path_GROFF
-if test -n "$GROFF"; then
- { $as_echo "$as_me:$LINENO: result: $GROFF" >&5
-$as_echo "$GROFF" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$GROFF" && break
-done
-test -n "$GROFF" || GROFF="none"
-
-for ac_prog in ps2pdf
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PS2PDF+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- case $PS2PDF in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PS2PDF="$PS2PDF" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/gnu/bin"
-for as_dir in $as_dummy
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PS2PDF="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-PS2PDF=$ac_cv_path_PS2PDF
-if test -n "$PS2PDF"; then
- { $as_echo "$as_me:$LINENO: result: $PS2PDF" >&5
-$as_echo "$PS2PDF" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$PS2PDF" && break
-done
-test -n "$PS2PDF" || PS2PDF="none"
-
-
-{ $as_echo "$as_me:$LINENO: checking whether to build documentation" >&5
-$as_echo_n "checking whether to build documentation... " >&6; }
-# Check whether --enable-docs was given.
-if test "${enable_docs+set}" = set; then
- enableval=$enable_docs; build_docs="${enableval}"
-else
- build_docs="no"
-fi
-
-{ $as_echo "$as_me:$LINENO: result: ${build_docs}" >&5
-$as_echo "${build_docs}" >&6; }
-if test "x${build_docs}" = xyes && test "x${GROFF}" = xnone ; then
- { { $as_echo "$as_me:$LINENO: error: can't build documentation without groff" >&5
-$as_echo "$as_me: error: can't build documentation without groff" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-
-
-if test x$build_docs = xyes; then
- BUILD_DOCS_TRUE=
- BUILD_DOCS_FALSE='#'
-else
- BUILD_DOCS_TRUE='#'
- BUILD_DOCS_FALSE=
-fi
-
-
-
-if test x$PS2PDF != xnone; then
- HAVE_PS2PDF_TRUE=
- HAVE_PS2PDF_FALSE='#'
-else
- HAVE_PS2PDF_TRUE='#'
- HAVE_PS2PDF_FALSE=
-fi
-
-
-ac_config_files="$ac_config_files Makefile xtrans.pc"
+ac_config_files="$ac_config_files Makefile doc/Makefile xtrans.pc"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -5083,17 +5616,38 @@ $as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
-if test -z "${BUILD_DOCS_TRUE}" && test -z "${BUILD_DOCS_FALSE}"; then
- { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_DOCS\" was never defined.
+if test -z "${ENABLE_DOCS_TRUE}" && test -z "${ENABLE_DOCS_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_DOCS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"ENABLE_DOCS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_XMLTO_TEXT_TRUE}" && test -z "${HAVE_XMLTO_TEXT_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_XMLTO_TEXT\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_XMLTO_TEXT\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_XMLTO_TRUE}" && test -z "${HAVE_XMLTO_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_XMLTO\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_XMLTO\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_FOP_TRUE}" && test -z "${HAVE_FOP_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_FOP\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"BUILD_DOCS\" was never defined.
+$as_echo "$as_me: error: conditional \"HAVE_FOP\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
-if test -z "${HAVE_PS2PDF_TRUE}" && test -z "${HAVE_PS2PDF_FALSE}"; then
- { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PS2PDF\" was never defined.
+if test -z "${HAVE_STYLESHEETS_TRUE}" && test -z "${HAVE_STYLESHEETS_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_STYLESHEETS\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-$as_echo "$as_me: error: conditional \"HAVE_PS2PDF\" was never defined.
+$as_echo "$as_me: error: conditional \"HAVE_STYLESHEETS\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -5419,7 +5973,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by xtrans $as_me 1.2.5, which was
+This file was extended by xtrans $as_me 1.2.6, which was
generated by GNU Autoconf 2.62. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5466,7 +6020,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-xtrans config.status 1.2.5
+xtrans config.status 1.2.6
configured by $0, generated by GNU Autoconf 2.62,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
@@ -5578,6 +6132,7 @@ do
case $ac_config_target in
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
"xtrans.pc") CONFIG_FILES="$CONFIG_FILES xtrans.pc" ;;
*) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
diff --git a/lib/libxtrans/configure.ac b/lib/libxtrans/configure.ac
index 45757bfea..ce521bbb6 100644
--- a/lib/libxtrans/configure.ac
+++ b/lib/libxtrans/configure.ac
@@ -20,16 +20,21 @@ dnl PERFORMANCE OF THIS SOFTWARE.
dnl
dnl Process this file with autoconf to create configure.
-AC_PREREQ([2.57])
-AC_INIT(xtrans, [1.2.5], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xtrans)
-AM_INIT_AUTOMAKE([dist-bzip2])
+AC_PREREQ([2.60])
+AC_INIT([xtrans], [1.2.6],
+ [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xtrans])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
-# Require xorg-macros 1.3 or later: XORG_DEFAULT_OPTIONS
+# Require xorg-macros minimum of 1.10 for DocBook XML documentation
m4_ifndef([XORG_MACROS_VERSION],
- [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.3)
+ [m4_fatal([must install xorg-macros 1.10 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.10)
XORG_DEFAULT_OPTIONS
+XORG_ENABLE_DOCS
+XORG_WITH_XMLTO(0.0.20)
+XORG_WITH_FOP
+XORG_CHECK_SGML_DOCTOOLS(1.5)
# Because xtrans is included into other modules rather than being linked
# with, these defines have to be added to the cflags line
@@ -49,21 +54,6 @@ sticky_bit_define="-DHAS_STICKY_DIR_BIT"
AC_SUBST(sticky_bit_define)
-# Documentation is currently provided in troff format, built on request
-AC_PATH_PROGS([GROFF], [groff], [none], [$PATH:/usr/gnu/bin])
-AC_PATH_PROGS([PS2PDF], [ps2pdf], [none], [$PATH:/usr/gnu/bin])
-
-AC_MSG_CHECKING([whether to build documentation])
-AC_ARG_ENABLE(docs, AC_HELP_STRING([--enable-docs],
- [Enable building of documentation]),
- [build_docs="${enableval}"], [build_docs="no"])
-AC_MSG_RESULT([${build_docs}])
-if test "x${build_docs}" = xyes && test "x${GROFF}" = xnone ; then
- AC_MSG_ERROR([can't build documentation without groff])
-fi
-
-AM_CONDITIONAL(BUILD_DOCS, [test x$build_docs = xyes])
-AM_CONDITIONAL(HAVE_PS2PDF, [test x$PS2PDF != xnone])
-
AC_OUTPUT([Makefile
+ doc/Makefile
xtrans.pc])
diff --git a/lib/libxtrans/doc/Makefile.am b/lib/libxtrans/doc/Makefile.am
new file mode 100644
index 000000000..19ad93910
--- /dev/null
+++ b/lib/libxtrans/doc/Makefile.am
@@ -0,0 +1,62 @@
+#
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+
+if ENABLE_DOCS
+doc_sources = xtrans.xml
+dist_doc_DATA = $(doc_sources)
+
+if HAVE_XMLTO
+doc_DATA = $(doc_sources:.xml=.html)
+
+if HAVE_FOP
+doc_DATA += $(doc_sources:.xml=.ps) $(doc_sources:.xml=.pdf)
+endif
+
+if HAVE_XMLTO_TEXT
+doc_DATA += $(doc_sources:.xml=.txt)
+endif
+
+if HAVE_STYLESHEETS
+XMLTO_FLAGS = \
+ -m $(XSL_STYLESHEET) \
+ --stringparam html.stylesheet="$(STYLESHEET_SRCDIR)/xorg.css"
+endif
+
+CLEANFILES = $(doc_DATA)
+
+SUFFIXES = .xml .ps .pdf .txt .html
+
+.xml.txt:
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $<
+
+.xml.html:
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $<
+
+.xml.pdf:
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $<
+
+.xml.ps:
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop ps $<
+
+endif HAVE_XMLTO
+endif ENABLE_DOCS
diff --git a/lib/libxtrans/doc/Makefile.in b/lib/libxtrans/doc/Makefile.in
new file mode 100644
index 000000000..cb6fe6719
--- /dev/null
+++ b/lib/libxtrans/doc/Makefile.in
@@ -0,0 +1,430 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+#
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_XMLTO_TRUE@am__append_1 = $(doc_sources:.xml=.ps) $(doc_sources:.xml=.pdf)
+@ENABLE_DOCS_TRUE@@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@am__append_2 = $(doc_sources:.xml=.txt)
+subdir = doc
+DIST_COMMON = $(am__dist_doc_DATA_DIST) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(install_sh) -d
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__dist_doc_DATA_DIST = xtrans.xml
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(docdir)" "$(DESTDIR)$(docdir)"
+dist_docDATA_INSTALL = $(INSTALL_DATA)
+docDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(dist_doc_DATA) $(doc_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
+ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+APP_MAN_DIR = @APP_MAN_DIR@
+APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHANGELOG_CMD = @CHANGELOG_CMD@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CWARNFLAGS = @CWARNFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
+DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_DOCS_FALSE = @ENABLE_DOCS_FALSE@
+ENABLE_DOCS_TRUE = @ENABLE_DOCS_TRUE@
+EXEEXT = @EXEEXT@
+FILE_MAN_DIR = @FILE_MAN_DIR@
+FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
+FOP = @FOP@
+GREP = @GREP@
+HAVE_FOP_FALSE = @HAVE_FOP_FALSE@
+HAVE_FOP_TRUE = @HAVE_FOP_TRUE@
+HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@
+HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@
+HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@
+HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@
+HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@
+HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@
+INSTALL_CMD = @INSTALL_CMD@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIB_MAN_DIR = @LIB_MAN_DIR@
+LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MAN_SUBSTS = @MAN_SUBSTS@
+MISC_MAN_DIR = @MISC_MAN_DIR@
+MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@
+VERSION = @VERSION@
+XMLTO = @XMLTO@
+XORG_MAN_PAGE = @XORG_MAN_PAGE@
+XORG_SGML_PATH = @XORG_SGML_PATH@
+XSL_STYLESHEET = @XSL_STYLESHEET@
+ac_ct_CC = @ac_ct_CC@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+fchown_define = @fchown_define@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sticky_bit_define = @sticky_bit_define@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+@ENABLE_DOCS_TRUE@doc_sources = xtrans.xml
+@ENABLE_DOCS_TRUE@dist_doc_DATA = $(doc_sources)
+@ENABLE_DOCS_TRUE@@HAVE_XMLTO_TRUE@doc_DATA = \
+@ENABLE_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(doc_sources:.xml=.html) \
+@ENABLE_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(am__append_1) \
+@ENABLE_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(am__append_2)
+@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@XMLTO_FLAGS = \
+@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ -m $(XSL_STYLESHEET) \
+@ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ --stringparam html.stylesheet="$(STYLESHEET_SRCDIR)/xorg.css"
+
+@ENABLE_DOCS_TRUE@@HAVE_XMLTO_TRUE@CLEANFILES = $(doc_DATA)
+@ENABLE_DOCS_TRUE@@HAVE_XMLTO_TRUE@SUFFIXES = .xml .ps .pdf .txt .html
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .xml .ps .pdf .txt .html
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign doc/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+uninstall-info-am:
+install-dist_docDATA: $(dist_doc_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)"
+ @list='$(dist_doc_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(dist_docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \
+ $(dist_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \
+ done
+
+uninstall-dist_docDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_doc_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(docdir)/$$f"; \
+ done
+install-docDATA: $(doc_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)"
+ @list='$(doc_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \
+ $(docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \
+ done
+
+uninstall-docDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(doc_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(docdir)/$$f"; \
+ done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(docdir)" "$(DESTDIR)$(docdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-dist_docDATA install-docDATA
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-dist_docDATA uninstall-docDATA \
+ uninstall-info-am
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-dist_docDATA install-docDATA install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
+ uninstall-dist_docDATA uninstall-docDATA uninstall-info-am
+
+
+@ENABLE_DOCS_TRUE@@HAVE_XMLTO_TRUE@.xml.txt:
+@ENABLE_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $<
+
+@ENABLE_DOCS_TRUE@@HAVE_XMLTO_TRUE@.xml.html:
+@ENABLE_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $<
+
+@ENABLE_DOCS_TRUE@@HAVE_XMLTO_TRUE@.xml.pdf:
+@ENABLE_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $<
+
+@ENABLE_DOCS_TRUE@@HAVE_XMLTO_TRUE@.xml.ps:
+@ENABLE_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop ps $<
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/lib/libxtrans/doc/xtrans.xml b/lib/libxtrans/doc/xtrans.xml
new file mode 100644
index 000000000..ec8b42d0c
--- /dev/null
+++ b/lib/libxtrans/doc/xtrans.xml
@@ -0,0 +1,1206 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
+
+<!-- lifted from troff+ms+XMan by doclifter -->
+<book id="xtrans">
+
+<bookinfo>
+ <title>X Transport Interface</title>
+ <subtitle>X Consortium Standard</subtitle>
+ <releaseinfo>X Version 11, Release 7.X</releaseinfo>
+ <authorgroup>
+ <author>
+ <firstname>Stuart</firstname><surname>Anderson</surname>
+ </author>
+ </authorgroup>
+ <othercredit><firstname>Ralph</firstname><surname>Mor</surname></othercredit>
+ <othercredit><firstname>Alan</firstname><surname>Coopersmith</surname></othercredit>
+ <corpname>NCR Corporation</corpname>
+ <releaseinfo>Version 0.7</releaseinfo>
+ <affiliation><orgname>The Open Group</orgname></affiliation>
+ <productnumber>X Version 11, Release 7.x</productnumber>
+
+<legalnotice>
+<para>
+Copyright &copy; 1993, 1994 NCR Corporation - Dayton, Ohio, USA
+</para>
+
+<para>
+All Rights Reserved
+</para>
+
+<para>
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted, provided
+that the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name NCR not be used in advertising
+or publicity pertaining to distribution of the software without specific,
+written prior permission. NCR makes no representations about the
+suitability of this software for any purpose. It is provided "as is"
+without express or implied warranty.
+</para>
+
+<para>
+NCR DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
+NO EVENT SHALL NCR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+</para>
+
+</legalnotice>
+
+<legalnotice>
+<para>
+Copyright &copy; 1993, 1994, 2002 The Open Group
+</para>
+
+<para>
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the &ldquo;Software&rdquo;), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+</para>
+
+<para>
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+</para>
+
+<para>
+THE SOFTWARE IS PROVIDED &ldquo;AS IS&rdquo;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+</para>
+
+<para>
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+</para>
+
+<para>
+X Window System is a trademark of The Open Group, Inc.
+</para>
+
+</legalnotice>
+
+</bookinfo>
+
+<preface><title>The X Transport Interface</title>
+<para>
+Designed by Stuart Anderson (NCR) with help from Ralph Mor (X Consortium)
+</para>
+
+<note><para>
+This documentation does not completely match the implementation in R6
+(as a result of some late changes made in the code). Specifically, support
+was added for font server cloning, and conditional compliation was introduced
+for client vs. server code.
+</para></note>
+</preface>
+
+<chapter id='purposes_and_goals'>
+<title>Purposes and Goals</title>
+
+<para>The X Transport Interface is intended to combine all system and
+transport specific code into a single place in the source tree. This API
+should be used by all libraries, clients and servers of the X Window System.
+Use of this API should allow the addition of new types of transports and
+support for new platforms without making any changes to the source except
+in the X Transport Interface code.</para>
+<para>This interface should solve the problem of multiple
+<code>#ifdef TRANSPORT</code> and <code>#ifdef PLATFORM</code>
+statements scattered throughout the source tree.</para>
+<para>This interface should provide enough functionality to support all
+types of protocols, including connection oriented protocols such as X11 and
+FS, and connection-less oriented protocols such as XDMCP.</para>
+
+</chapter>
+
+<chapter id='overview_of_the_interface'>
+<title>Overview of the Interface</title>
+
+<para>
+The interface provides an API for use by applications. The functions in
+this API perform work that is common to all transports and systems, such
+as parsing an address into a host and port number. The functions in this
+API call transport specific functions that are contained in a table whose
+contents are defined at compile time. This table contains an entry for each
+type of transport. Each entry is a record containing mostly pointers to
+function that implements the interface for the given transport.
+</para>
+<para>
+This API does not provide an abstraction for <function>select()</function>
+or <function>poll()</function>.
+These functions are themselves transport independent, so an additional
+interface is not needed for these functions. It is also unclear how such
+an interface would affect performance.
+</para>
+</chapter>
+
+<chapter id='definition_of_address_specification_format'>
+<title>Definition of Address Specification Format</title>
+
+<para>
+Addresses are specified in the following syntax,
+
+<synopsis>
+<replaceable>protocol</replaceable>/<replaceable>host</replaceable>:<replaceable>port</replaceable>
+</synopsis>
+
+where <replaceable>protocol</replaceable> specifies a protocol family
+or an alias for a protocol family. A definition of common protocol
+families is given in a later section.
+</para>
+<para>
+The <replaceable>host</replaceable> part specifies the name of a host or other
+transport dependent entity that could be interpreted as a Network Service Access Point
+(NSAP).
+</para>
+<para>
+The <replaceable>port</replaceable> part specifies the name of a Transport Service
+Access Point (TSAP). The format of the TSAP is defined by the underlying transport
+implementation, but it is represented using a string format when it is
+part of an address.
+</para>
+</chapter>
+
+<chapter id='internal_data_structures'>
+<title>Internal Data Structures</title>
+<para>
+There are two major data structures associated with the transport
+independent portion of this interface. Additional data structures
+may be used internally by each transport.
+</para>
+<sect1 id="xtransport">
+<title>Xtransport</title>
+<para>
+Each transport supported has an entry in the transport table. The transport
+table is an array of Xtransport records. Each record contains all the entry
+points for a single transport. This record is defined as:
+</para>
+
+<synopsis>
+typedef struct _Xtransport {
+
+ char *TransName;
+ int flags;
+
+ XtransConnInfo (*OpenCOTSClient)(
+ struct _Xtransport *, /* transport */
+ char *, /* protocol */
+ char *, /* host */
+ char * /* port */
+ );
+
+ XtransConnInfo (*OpenCOTSServer)(
+ struct _Xtransport *, /* transport */
+ char *, /* protocol */
+ char *, /* host */
+ char * /* port */
+ );
+
+ XtransConnInfo (*OpenCLTSClient)(
+ struct _Xtransport *, /* transport */
+ char *, /* protocol */
+ char *, /* host */
+ char * /* port */
+ );
+
+ XtransConnInfo (*OpenCLTSServer)(
+ struct _Xtransport *, /* transport */
+ char *, /* protocol */
+ char *, /* host */
+ char * /* port */
+ );
+
+ int (*SetOption)(
+ XtransConnInfo, /* connection */
+ int, /* option */
+ int /* arg */
+ );
+
+ int (*CreateListener)(
+ XtransConnInfo, /* connection */
+ char *, /* port */
+ int /* flags */
+ );
+
+ int (*ResetListener)(
+ XtransConnInfo /* connection */
+ );
+
+ XtransConnInfo (*Accept)(
+ XtransConnInfo /* connection */
+ );
+
+ int (*Connect)(
+ XtransConnInfo, /* connection */
+ char *, /* host */
+ char * /* port */
+ );
+
+ int (*BytesReadable)(
+ XtransConnInfo, /* connection */
+ BytesReadable_t * /* pend */
+ );
+
+ int (*Read)(
+ XtransConnInfo, /* connection */
+ char *, /* buf */
+ int /* size */
+ );
+
+ int (*Write)(
+ XtransConnInfo, /* connection */
+ char *, /* buf */
+ int /* size */
+ );
+
+ int (*Readv)(
+ XtransConnInfo, /* connection */
+ struct iovec *, /* buf */
+ int /* size */
+ );
+
+ int (*Writev)(
+ XtransConnInfo, /* connection */
+ struct iovec *, /* buf */
+ int /* size */
+ );
+
+ int (*Disconnect)(
+ XtransConnInfo /* connection */
+ );
+
+ int (*Close)(
+ XtransConnInfo /* connection */
+ );
+
+} Xtransport;
+</synopsis>
+
+<para>
+The <structfield>flags</structfield> field can contain an OR of
+the following masks:
+<variablelist>
+ <varlistentry>
+ <term><symbol>TRANS_ALIAS</symbol></term>
+ <listitem><para>
+indicates that this record is providing an alias, and should
+not be used to create a listener.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><symbol>TRANS_LOCAL</symbol></term>
+ <listitem><para>
+indicates that this is a <symbol>LOCALCONN</symbol> transport.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><symbol>TRANS_ABSTRACT</symbol></term>
+ <listitem><para>
+indicates that a local connection transport uses the abstract socket namespace.
+ </para></listitem>
+ </varlistentry>
+</variablelist>
+</para>
+
+<para>
+Some additional flags may be set in the <structfield>flags</structfield>
+field by the library while it is running:
+<variablelist>
+ <varlistentry>
+ <term><symbol>TRANS_DISABLED</symbol></term>
+ <listitem><para>
+indicates that this transport has been disabled.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><symbol>TRANS_NOLISTEN</symbol></term>
+ <listitem><para>
+indicates that servers should not open new listeners using this transport.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><symbol>TRANS_NOUNLINK</symbol></term>
+ <listitem><para>
+set by a transport backend to indicate that the endpoints for its connection
+should not be unlinked.
+ </para></listitem>
+ </varlistentry>
+</variablelist>
+</para>
+</sect1>
+
+<sect1 id="xtransconninfo">
+<title>XtransConnInfo</title>
+<para>
+Each connection will have an opaque <structname>XtransConnInfo</structname>
+transport connection
+object allocated for it. This record contains information specific to the
+connection. The record is defined as:
+
+<synopsis>
+typedef struct _XtransConnInfo *XtransConnInfo;
+
+struct _XtransConnInfo {
+ struct _Xtransport *transptr;
+ char *priv;
+ int flags;
+ int fd;
+ int family;
+ char *addr;
+ int addrlen;
+ char *peeraddr;
+ int peeraddrlen;
+};
+</synopsis>
+</para>
+</sect1>
+</chapter>
+
+<chapter id='exposed_transport_independent_api'>
+<title>Exposed Transport Independent API</title>
+
+<para>
+This API is included in each library and server that uses it. The API may
+be used by the library, but it is not added to the public API for that
+library. This interface is simply an implementation facilitator. This API
+contains a low level set of core primitives, and a few utility functions
+that are built on top of the primitives. The utility functions exist to
+provide a more familiar interface that can be used to port existing code.
+</para>
+<para>
+A macro is defined in Xtrans.h for TRANS(func) that creates a unique function
+name depending on where the code is compiled. For example, when built for
+Xlib, TRANS(OpenCOTSClient) becomes <function>_X11TransOpenCOTSClient</function>.
+</para>
+<para>
+All failures are considered fatal, and the connection should be closed
+and re-established if desired. In most cases, however, the value of
+errno will be available for debugging purposes.
+</para>
+<sect1 id="core_interface_api">
+<title>Core Interface API</title>
+<itemizedlist mark='bullet'>
+ <listitem>
+ <para>
+XtransConnInfo TRANS(OpenCOTSClient)(char *address)
+ </para>
+ <para>
+This function creates a Connection-Oriented Transport that is
+suitable for use by a client. The parameter <parameter>address</parameter>
+contains the full address of the server to which this endpoint will be connected. This
+functions returns an opaque transport connection object on success, or
+NULL on failure.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+XtransConnInfo TRANS(OpenCOTSServer)(char *address)
+ </para>
+ <para>
+This function creates a Connection-Oriented Transport that is suitable
+for use by a server. The parameter <parameter>address</parameter> contains the
+full address to which this server will be bound. This functions returns an opaque
+transport connection object on success, or NULL on failure.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+XtransConnInfo TRANS(OpenCLTSClient)(char *address)
+ </para>
+ <para>
+This function creates a Connection-Less Transport that is suitable for
+use by a client. The parameter <parameter>address</parameter> contains the
+full address of the server to which this endpoint will be connected. This functions
+returns an opaque transport connection object on success, or NULL on failure.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+XtransConnInfo TRANS(OpenCLTSServer)(char *address)
+ </para>
+ <para>
+This function creates a Connection-Less Transport that is suitable for
+use by a server. The parameter <parameter>address</parameter> contains the
+full address to which this server will be bound. This functions returns an opaque
+transport connection object on success, or NULL on failure.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int TRANS(SetOption)(XtransConnInfo connection, int option, int arg)
+ </para>
+ <para>
+This function sets transport options, similar to the way
+<function>setsockopt()</function> and <function>ioctl()</function> work.
+The parameter <parameter>connection</parameter> is an endpoint
+that was obtained from _XTransOpen*() functions. The parameter
+<parameter>option</parameter> contains the option that will be set. The actual
+values for option are defined in a later section. The parameter
+<parameter>arg</parameter> can be used to pass in an additional value that may
+be required by some options. This function return 0 on
+success and -1 on failure.
+ </para>
+ <note><para>
+Based on current usage, the complimentary function
+<function>TRANS(GetOption)</function> is not necessary.
+ </para></note>
+ </listitem>
+ <listitem>
+ <para>
+int TRANS(CreateListener)(XtransConnInfo connection, char *port, int flags)
+ </para>
+ <para>
+This function sets up the server endpoint for listening. The parameter
+<parameter>connection</parameter> is an endpoint that was obtained from
+<function>TRANS(OpenCOTSServer)()</function> or
+<function>TRANS(OpenCLTSServer)()</function>. The parameter
+<parameter>port</parameter> specifies the
+port to which this endpoint should be bound for listening. If port is NULL,
+then the transport may attempt to allocate any available TSAP for this
+connection. If the transport cannot support this, then this function will
+return a failure. The <parameter>flags</parameter> parameter can be set
+to <symbol>ADDR_IN_USE_ALLOWED</symbol> to allow the call to the underlying
+binding function to fail with a <errorname>EADDRINUSE</errorname> error
+without causing the <function>TRANS(CreateListener)</function>
+function itself to fail. This function return 0 on success and -1 on failure.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int TRANS(ResetListener)(XtransConnInfo connection)
+ </para>
+ <para>
+When a server is restarted, certain listen ports may need to be reset.
+For example, unix domain needs to check that the file used for
+communication has not been deleted. If it has, it must be recreated.
+The parameter <parameter>connection</parameter> is an opened and bound
+endpoint that was obtained from <function>TRANS(OpenCOTSServer)()</function>
+and passed to <function>TRANS(CreateListener)()</function>.
+This function will return one of the following values:
+<symbol>TRANS_RESET_NOOP</symbol>,
+<symbol>TRANS_RESET_NEW_FD</symbol>, or
+<symbol>TRANS_RESET_FAILURE</symbol>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+XtransConnInfo TRANS(Accept)(XtransConnInfo connection)
+ </para>
+ <para>
+Once a connection indication is received, this function can be called to
+accept the connection. The parameter <parameter>connection</parameter> is
+an opened and bound endpoint that was obtained from
+<function>TRANS(OpenCOTSServer)()</function> and passed to
+<function>TRANS(CreateListener)()</function>. This function will return a
+new opaque transport connection object upon success, NULL otherwise.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int TRANS(Connect)(XtransConnInfo connection, char *address)
+ </para>
+ <para>
+This function creates a connection to a server. The parameter
+<parameter>connection</parameter> is an endpoint that was obtained
+from <function>TRANS(OpenCOTSClient)()</function>. The parameter
+<parameter>address</parameter> specifies the TSAP to which this endpoint
+should connect. If the
+protocol is included in the address, it will be ignored. This function
+return 0 on success and -1 on failure.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int TRANS(BytesReadable)(XtransConnInfo connection, BytesReadable_t *pend);
+ </para>
+ <para>
+This function provides the same functionality as the BytesReadable macro.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int TRANS(Read)(XtransConnInfo connection, char *buf, int size)
+ </para>
+ <para>
+This function will return the number of bytes requested on a COTS
+connection, and will return the minimum of the number bytes requested or
+the size of the incoming packet on a CLTS connection.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int TRANS(Write)(XtransConnInfo connection, char *buf, int size)
+ </para>
+ <para>
+This function will write the requested number of bytes on a COTS
+connection, and will send a packet of the requested size on a CLTS connection.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int TRANS(Readv)(XtransConnInfo connection, struct iovec *buf, int size)
+ </para>
+ <para>
+Similar to <function>TRANS(Read)()</function>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ int TRANS(Writev)(XtransConnInfo connection, struct iovec *buf, int size)
+ </para>
+ <para>
+Similar to <function>TRANS(Write)()</function>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int TRANS(Disconnect)(XtransConnInfo connection)
+ </para>
+ <para>
+This function is used when an orderly disconnect is desired. This function
+breaks the connection on the transport. It is similar to the socket function
+<function>shutdown()</function>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int TRANS(Close)(XtransConnInfo connection)
+ </para>
+ <para>
+This function closes the transport, unbinds it, and frees all resources that
+was associated with the transport. If a <function>TRANS(Disconnect)</function>
+call was not made on the connection, a disorderly disconnect may occur.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int TRANS(IsLocal)(XtransConnInfo connection)
+ </para>
+ <para>
+Returns TRUE if it is a local transport.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int TRANS(GetMyAddr)(XtransConnInfo connection, int *familyp, int *addrlenp,
+Xtransaddr **addrp)
+ </para>
+ <para>
+This function is similar to
+<function>getsockname()</function>.
+This function will allocate space for the address, so it must be freed by
+the caller. Not all transports will have a valid address until a connection
+is established. This function should not be used until the connection is
+established with
+<function>Connect()</function> or
+<function>Accept()</function>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int TRANS(GetPeerAddr)(XtransConnInfo connection, int *familyp, int *addrlenp,
+Xtransaddr **addrp)
+ </para>
+ <para>
+This function is similar to
+<function>getpeername()</function>.
+This function will allocate space for the address, so it must be freed by
+the caller. Not all transports will have a valid address until a connection
+is established. This function should not be used until the connection is
+established with
+<function>Connect()</function> or
+<function>Accept()</function>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int TRANS(GetConnectionNumber)(XtransConnInfo connection)
+ </para>
+ <para>
+Returns the file descriptor associated with this transport.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int TRANS(MakeAllCOTSServerListeners)(char *port, int *partial_ret,
+int *count_ret, XtransConnInfo **connections_ret)
+ </para>
+ <para>
+This function should be used by most servers. It will try to establish
+a COTS server endpoint for each transport listed in the transport table.
+<parameter>partial_ret</parameter> will be set to <symbol>True</symbol> if
+only a partial network could be created. <parameter>count_ret</parameter> is
+the number of transports returned, and <parameter>connections_ret</parameter>
+is the list of transports.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int TRANS(MakeAllCLTSServerListeners)( char *port, int *partial_ret,
+int *count_ret, XtransConnInfo **connections_ret)
+ </para>
+ <para>
+This function should be used by most servers. It will try to establish a
+CLTS server endpoint for each transport listed in the transport table.
+<parameter>partial_ret</parameter> will be set to <symbol>True</symbol> if
+only a partial network could be created. <parameter>count_ret</parameter> is
+the number of transports returned, and <parameter>connections_ret</parameter>
+is the list of transports.
+ </para>
+ </listitem>
+</itemizedlist>
+</sect1>
+
+<sect1 id="utility_api">
+<title>Utility API</title>
+<para>
+This section describes a few useful functions that have been implemented on
+top of the Core Interface API. These functions are being provided as a
+convenience.
+</para>
+<itemizedlist mark='bullet'>
+ <listitem>
+ <para>
+int TRANS(ConvertAddress)(int *familyp, int *addrlenp, Xtransaddr *addrp)
+ </para>
+ <para>
+This function converts a sockaddr based address to an X authorization based
+address (ie AF_INET, AF_UNIX to the X protocol definition (ie FamilyInternet,
+FamilyLocal)).
+ </para>
+ </listitem>
+</itemizedlist>
+</sect1>
+</chapter>
+
+<chapter id="transport_option_definition">
+<title>Transport Option Definition</title>
+<para>
+The following options are defined for the
+<function>TRANS(SetOption)()</function>
+ function. If an OS or transport does not support any of these options,
+then it will silently ignore the option.
+</para>
+
+<itemizedlist mark='bullet'>
+ <listitem>
+ <para>
+<symbol>TRANS_NONBLOCKING</symbol>
+ </para>
+ <para>
+This option controls the blocking mode of the connection. If the argument
+is set to 1, then the connection will be set to blocking. If the argument
+is set to 0, then the connection will be set to non- blocking.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+<symbol>TRANS_CLOSEONEXEC</symbol>
+ </para>
+ <para>
+This option determines what will happen to the connection when an exec is
+encountered. If the argument is set to 1, then the connection will be
+closed when an exec occurs. If the argument is set to 0, then the
+connection will not be closed when an exec occurs.
+ </para>
+ </listitem>
+</itemizedlist>
+</chapter>
+
+<chapter id="hidden_transport_dependent_api">
+<title>Hidden Transport Dependent API</title>
+<para>
+The hidden transport dependent functions are placed in the Xtransport record.
+These function are similar to the Exposed Transport Independent API, but
+some of the parameters and return values are slightly different. Stuff like
+the <code>#ifdef SUNSYSV</code> should be handled inside these functions.
+</para>
+
+<itemizedlist mark='bullet'>
+ <listitem>
+ <para>
+XtransConnInfo *OpenCOTSClient (
+struct _Xtransport *thistrans, char *protocol, char *host, char *port)
+ </para>
+ <para>
+This function creates a Connection-Oriented Transport. The parameter
+<parameter>thistrans</parameter>
+points to an Xtransport entry in the transport table. The parameters
+<parameter>protocol</parameter>,
+<parameter>host</parameter>, and
+<parameter>port</parameter>, point to strings containing the corresponding
+parts of the address that was passed into <function>TRANS(OpenCOTSClient)()</function>.
+This function must allocate and initialize the contents of the XtransConnInfo
+structure that is returned by this function. This function will open the
+transport, and bind it into the transport namespace if applicable. The local
+address portion of the XtransConnInfo structure will also be filled in by
+this function.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+XtransConnInfo *OpenCOTSServer (
+struct _Xtransport *thistrans, char *protocol, char *host, char *port)
+ </para>
+ <para>
+This function creates a Connection-Oriented Transport. The parameter
+<parameter>thistrans</parameter>
+points to an Xtransport entry in the transport table. The
+parameters
+<parameter>protocol</parameter>,
+<parameter>host</parameter>, and
+<parameter>port</parameter> point to strings containing the
+corresponding parts of the address that was passed into
+<function>TRANS(OpenCOTSClient)()</function>.
+This function must allocate and initialize the contents of the
+XtransConnInfo structure that is returned by this function. This function
+will open the transport.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+XtransConnInfo *OpenCLTSClient (
+struct _Xtransport *thistrans, char *protocol, char *host, char *port)
+ </para>
+ <para>
+This function creates a Connection-Less Transport. The parameter
+<parameter>thistrans</parameter>
+points to an Xtransport entry in the transport table. The parameters
+<parameter>protocol</parameter>,
+<parameter>host</parameter>, and
+<parameter>port</parameter> point to strings containing the
+corresponding parts of the address that was passed into
+<function>TRANS(OpenCOTSClient)()</function>.
+This function must allocate and initialize the contents of the XtransConnInfo
+structure that is returned by this function. This function will open the
+transport, and bind it into the transport namespace if applicable. The
+local address portion of the XtransConnInfo structure will also be filled
+in by this function.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+XtransConnInfo *OpenCLTSServer (
+struct _Xtransport *thistrans, char *protocol, char *host, char *port)
+ </para>
+ <para>
+This function creates a Connection-Less Transport. The parameter
+<parameter>thistrans</parameter>
+points to an Xtransport entry in the transport table. The parameters
+<parameter>protocol</parameter>,
+<parameter>host</parameter>, and
+<parameter>port</parameter> point to strings containing the
+corresponding parts of the address that was passed into
+<function>TRANS(OpenCOTSClient)()</function>.
+This function must allocate and initialize the contents of the
+XtransConnInfo structure that is returned by this function. This
+function will open the transport.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int SetOption (struct _Xtransport *thistrans, int option, int arg)
+ </para>
+ <para>
+This function provides a transport dependent way of implementing the
+options defined by the X Transport Interface. In the current prototype,
+this function is not being used, because all of the options defined so far
+are transport independent. This function will have to be used if a radically
+different transport type is added, or a transport dependent option is defined.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int CreateListener (struct _Xtransport *thistrans, char *port, int flags )
+ </para>
+ <para>
+This function takes a transport endpoint opened for a server, and sets it
+up to listen for incoming connection requests. The parameter
+<parameter>port</parameter>
+contains the port portion of the address that was passed to the Open function.
+The parameter <parameter>flags</parameter> should be set to
+<symbol>ADDR_IN_USE_ALLOWED</symbol> if the underlying transport endpoint
+may be already bound and this should not be considered
+as an error. Otherwise flags should be set to 0. This is used by IPv6 code,
+where the same socket can be bound to both an IPv6 address and then to a
+IPv4 address. This function will bind the transport into the transport
+name space if applicable, and fill in the local address portion of the
+XtransConnInfo structure. The transport endpoint will then be set to
+listen for incoming connection requests.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int ResetListener (struct _Xtransport *thistrans)
+ </para>
+ <para>
+This function resets the transport for listening.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ XtransConnInfo Accept(struct _Xtransport *thistrans)
+ </para>
+ <para>
+This function creates a new transport endpoint as a result of an
+incoming connection request. The parameter
+<parameter>thistrans</parameter> is the endpoint
+that was opened for listening by the server. The new endpoint is
+opened and bound into the transport’s namespace. A XtransConnInfo
+structure describing the new endpoint is returned from this function
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int Connect(struct _Xtransport *thistrans, char *host, char *port )
+ </para>
+ <para>
+This function establishes a connection to a server. The parameters
+<parameter>host</parameter> and
+<parameter>port</parameter>
+describe the server to which the connection should be
+established. The connection will be established so that
+<function>Read()</function> and
+<function>Write()</function> call can be made.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int BytesReadable(struct _Xtransport *thistrans, BytesReadable_t *pend )
+ </para>
+ <para>
+This function replaces the
+<function>BytesReadable()</function>
+macro. This allows each transport to have it’s own mechanism for determining
+how much data is ready to be read.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int Read(struct _Xtransport *thistrans, char *buf, int size )
+ </para>
+ <para>
+This function reads size bytes into buf from the connection.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int Write(struct _Xtransport *thistrans, char *buf, int size )
+ </para>
+ <para>
+This function writes size bytes from buf to the connection.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int Readv(struct _Xtransport *thistrans, struct iovec *buf, int size )
+ </para>
+ <para>
+This function performs a <function>readv()</function> on the connection.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int Writev(struct _Xtransport *thistrans, struct iovec *buf, int size )
+ </para>
+ <para>
+This function performs a <function>writev()</function> on the connection.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int Disconnect(struct _Xtransport *thistrans)
+ </para>
+ <para>
+This function initiates an orderly shutdown of a connection. If a
+transport does not distinguish between orderly and disorderly
+disconnects, then a call to this function will have no affect.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+int Close(struct _Xtransport *thistrans)
+ </para>
+ <para>
+This function will break the connection, and close the endpoint.
+ </para>
+ </listitem>
+</itemizedlist>
+</chapter>
+<chapter id="configuration">
+<title>Configuration</title>
+
+<para>
+The implementation of each transport can be platform specific. It is expected
+that existing connection types such as <symbol>TCPCONN</symbol>,
+<symbol>UNIXCONN</symbol>, <symbol>LOCALCONN</symbol>, and
+<symbol>STREAMSCONN</symbol> will be replaced with flags for each
+possible transport type.
+</para>
+<para>
+In X11R6, the below flags to enable transport types were set in
+<symbol>ConnectionFlags</symbol> in the <filename>vendor.cf</filename> or
+<filename>site.def</filename> config files.
+</para>
+<para>
+In X11R7 modular releases, these flags are set when running
+<filename>configure</filename> scripts which include the
+<function>XTRANS_CONNECTION_FLAGS</function> macro from
+<filename>xtrans.m4</filename>.
+</para>
+<informaltable pgwide='0' frame='none'>
+ <tgroup cols='4' align='left'>
+ <colspec colname='define' align='center'/>
+ <colspec colname='enable'/>
+ <colspec colname='desc'/>
+ <thead>
+ <row>
+ <entry><code>#define</code></entry>
+ <entry>configure flag</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><symbol>TCPCONN</symbol></entry>
+ <entry><option>--enable-tcp-transport</option></entry>
+ <entry>
+ Enables the INET (IPv4) Domain Socket based transport
+ </entry>
+ </row>
+ <row>
+ <entry><symbol>IPv6</symbol></entry>
+ <entry><option>--enable-ipv6</option></entry>
+ <entry>
+ Extends <symbol>TCPCONN</symbol> to enable IPv6 Socket based transport
+ </entry>
+ </row>
+ <row>
+ <entry><symbol>UNIXCONN</symbol></entry>
+ <entry><option>--enable-unix-transport</option></entry>
+ <entry>
+ Enables the UNIX Domain Socket based transport
+ </entry>
+ </row>
+ <row>
+ <entry><symbol>STREAMSCONN</symbol></entry>
+ <entry><emphasis>Not available in X11R7</emphasis></entry>
+ <entry>
+ Enables the TLI based transports
+ </entry>
+ </row>
+ <row>
+ <entry><symbol>LOCALCONN</symbol></entry>
+ <entry><option>--enable-local-transport</option></entry>
+ <entry>
+ Enables the SYSV Local connection transports
+ </entry>
+ </row>
+ <row>
+ <entry><symbol>DNETCONN</symbol></entry>
+ <entry><emphasis>Not available in X11R7</emphasis></entry>
+ <entry>
+ Enables the DECnet transports
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+
+</chapter>
+
+<chapter id="transport_specific_definitions">
+<title>Transport Specific Definitions</title>
+
+<informaltable pgwide='0' frame='none'>
+ <tgroup cols='4' align='center'>
+ <colspec colname='c1'/>
+ <colspec colname='c2'/>
+ <colspec colname='c3'/>
+ <colspec colname='c4'/>
+ <thead>
+ <row>
+ <entry morerows="1" align='center'>Protocol Family</entry>
+ <entry namest="c2" nameend="c4" align='center'>Address Component</entry>
+ </row>
+ <row>
+ <entry align='center'>protocol</entry>
+ <entry align='center'>host</entry>
+ <entry align='center'>port</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry align='center'>Internet</entry>
+ <entry align='center'>inet inet6 tcp udp</entry>
+ <entry align='center'>name of an internet addressable host</entry>
+ <entry align='center'>string containing the name of a service or a valid port number. Example: "xserver0", "7100"</entry>
+ </row>
+ <row>
+ <entry align='center'>DECnet</entry>
+ <entry align='center'>decnet</entry>
+ <entry align='center'>name of a DECnet addressable host</entry>
+ <entry align='center'>string containing the complete name of the object. Example: "X$X0"</entry>
+ </row>
+ <row>
+ <entry align='center'>NETware</entry>
+ <entry align='center'>ipx</entry>
+ <entry align='center'>name of a NETware addressable host</entry>
+ <entry align='center'>Not sure of the specifics yet.</entry>
+ </row>
+ <row>
+ <entry align='center'>OSI</entry>
+ <entry align='center'>osi</entry>
+ <entry align='center'>name of an OSI adressable host.</entry>
+ <entry align='center'>Not sure of the specifics yet.</entry>
+ </row>
+ <row>
+ <entry align='center'>Local</entry>
+ <entry align='center'>local pts named sco isc</entry>
+ <entry align='center'>(ignored)</entry>
+ <entry align='center'>String containing the port name, ie "xserver0", "fontserver0".</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+</chapter>
+
+<chapter id="implementation_notes">
+<title>Implementation Notes</title>
+<para>
+This section refers to the prototype implementation that is being developed
+concurrently with this document. This prototype has been able to flush out many
+details and problems as the specification was being developed.
+</para>
+<para>
+In X11R6, all of the source code for this interface was located in
+<filename>xc/lib/xtrans</filename>.
+</para>
+<para>
+In X11R7, all of the source code for this interface is delivered via
+the <systemitem>lib/libxtrans</systemitem> modular package from X.Org,
+and is installed under
+<filename><replaceable>${prefix}</replaceable>/X11/Xtrans</filename>
+so that other modules may find it when they build.
+</para>
+<para>
+All functions names in the source are of the format
+<function>TRANS(func)()</function>. The
+<function>TRANS()</function>
+macro is defined as
+<programlisting language="C">
+#if (__STDC__ &amp;&amp; !defined(UNIXCPP)) || defined(ANSICPP)
+#define TRANS(func) _PROTOCOLTrans##func
+#else
+#define TRANS(func) _PROTOCOLTrans/**/func
+#endif
+</programlisting>
+</para>
+
+<para>
+<symbol>PROTOCOL</symbol> will be uniquely defined in each directory
+where this code is compiled.
+<symbol>PROTOCOL</symbol> will be defined to be the name of the protocol
+that is implemented by the library or server, such as X11, FS, and ICE.
+</para>
+
+<para>
+All libraries and servers that use the X Transport Interface should have a new
+file called <filename><replaceable>TRANSPORT</replaceable>trans.c</filename>.
+This file will include the transports based on the configuration flags
+provided by the <filename>configure</filename> script. Below is an
+example <filename>xfstrans.c</filename> for the font server.
+</para>
+
+<programlisting language="C">
+#include "config.h"
+
+#define FONT_t 1
+#define TRANS_REOPEN 1
+#define TRANS_SERVER 1
+
+#include &lt;X11/Xtrans/transport.c&gt;
+</programlisting>
+<para>
+The source files for this interface are listed below.
+</para>
+
+<variablelist>
+ <varlistentry>
+ <term><filename>Xtrans.h</filename></term>
+ <listitem><para>
+Function prototypes and defines for the Transport Independent API.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>Xtransint.h</filename></term>
+ <listitem><para>
+Used by the interface implementation only.
+Contains the internal data structures.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>Xtranssock.c</filename></term>
+ <listitem><para>
+Socket implementation of the Transport Dependent API.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>Xtranstli.c</filename></term>
+ <listitem><para>
+TLI implementation of the Transport Dependent API.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>Xtransdnet.c</filename></term>
+ <listitem><para>
+DECnet implementation of the Transport Dependent API.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>Xtranslocal.c</filename></term>
+ <listitem><para>
+Implementation of the Transport Dependent API for SYSV Local connections.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>Xtrans.c</filename></term>
+ <listitem><para>
+Exposed Transport Independent API Functions.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>Xtransutil.c</filename></term>
+ <listitem><para>
+Collection of Utility functions that use the X Transport Interface.
+ </para></listitem>
+ </varlistentry>
+</variablelist>
+
+
+<para>
+The file <filename>Xtransint.h</filename> contains much of the transport
+related code that was previously in <filename>Xlibint.h</filename> and
+<filename>Xlibnet.h</filename>.
+This will make the definitions available for all transport users. This
+should also obsolete the equivalent code in other libraries.
+</para>
+
+</chapter>
+</book>
diff --git a/lib/libxtrans/xtrans.m4 b/lib/libxtrans/xtrans.m4
index b58081ca9..da35a759d 100644
--- a/lib/libxtrans/xtrans.m4
+++ b/lib/libxtrans/xtrans.m4
@@ -1,29 +1,25 @@
-dnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $
dnl
-dnl Copyright 2005 Sun Microsystems, Inc. All rights reserved.
-dnl
-dnl Permission to use, copy, modify, distribute, and sell this software and its
-dnl documentation for any purpose is hereby granted without fee, provided that
-dnl the above copyright notice appear in all copies and that both that
-dnl copyright notice and this permission notice appear in supporting
-dnl documentation.
-dnl
-dnl The above copyright notice and this permission notice shall be included
-dnl in all copies or substantial portions of the Software.
-dnl
-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-dnl OTHER DEALINGS IN THE SOFTWARE.
-dnl
-dnl Except as contained in this notice, the name of the copyright holders shall
-dnl not be used in advertising or otherwise to promote the sale, use or
-dnl other dealings in this Software without prior written authorization
-dnl from the copyright holders.
-dnl
+dnl Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+dnl
+dnl Permission is hereby granted, free of charge, to any person obtaining a
+dnl copy of this software and associated documentation files (the "Software"),
+dnl to deal in the Software without restriction, including without limitation
+dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
+dnl and/or sell copies of the Software, and to permit persons to whom the
+dnl Software is furnished to do so, subject to the following conditions:
+dnl
+dnl The above copyright notice and this permission notice (including the next
+dnl paragraph) shall be included in all copies or substantial portions of the
+dnl Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+dnl DEALINGS IN THE SOFTWARE.
+dnl
# XTRANS_TCP_FLAGS()
# ------------------