Update to xrandr 1.3.3

This commit is contained in:
matthieu 2010-07-31 07:46:51 +00:00
parent 366b5ebac5
commit ac1a6f7f2c
10 changed files with 3292 additions and 769 deletions

View File

@ -1,3 +1,281 @@
commit a06506ca5df0a69e0ca27845855187ff62b78a9d
Author: Julien Cristau <jcristau@debian.org>
Date: Mon Jul 19 18:07:56 2010 +0100
Bump to 1.3.3
commit 2cc54b2f6280cc2e5519b572f960ecef36d750ac
Author: Julien Cristau <jcristau@debian.org>
Date: Mon Jul 19 18:06:56 2010 +0100
Require xorg-macros 1.4 for XORG_INSTALL
commit 7e6b0adcbd6c9e691b538f99536dcd7106ed1f6a
Author: Julien Cristau <jcristau@debian.org>
Date: Mon Jul 19 18:05:37 2010 +0100
Kill cvs keyword
commit 61fc9cc04e1ac179ac5e2cc4ff861bb362f0b801
Author: Eric Piel <eric@triangle.(none)>
Date: Sun Jan 10 00:08:53 2010 +0100
xrandr: get gamma and brightness
Even in verbose query mode, gamma and brigthness were not displayed.
That's because they are not stored in the server the same way they are
specified on the command line: they are stored as 256 * 3 u16 while
the command line is 3 + 1 floats. Still, this is useful info for the
users, and they don't care about how it's stored in the server.
So we do a regression over the values stored to recover info in the same
way as on the command line: gamma and brightness.
Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Reviewed-By: Matthias Hopf <mhopf@suse.de>
commit b5627bb72b3ca2c7f5a702b7134a5c6dd4f83687
Author: Eric Piel <eric@triangle.(none)>
Date: Sun Jan 10 00:08:53 2010 +0100
xrandr: fix maximum gamma set
Gamma is an array of 3 16-bit values. Currently, the maximum value assigned is
255*256, which is only 65280. Make sure that when we set the gamma, the maximum
value is 65535. It's slightly brighter but also helps to avoid kludges to
detect clamped values when reading back the gamma.
Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Reviewed-by: Matthias Hopf <mhopf@suse.de>
commit d138c73276226ce424d36e80ce745aa9461f110e
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Thu Feb 11 10:08:07 2010 -0500
config: move CWARNFLAGS from configure.ac to Makefile.am
Compiler warning flags should be explicitly set in the makefile
rather than being merged with other packages compiler flags.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit ac6606d8da914610446c5327813798bfbba4d6c2
Author: Éric Piel <eric.piel@tremplin-utc.net>
Date: Wed Jan 6 14:42:15 2010 +0100
xrandr: fix brightness to prevent gamma to overflow and to allow 0
With the new brightness option, gamma would overflow with values > 1,
leading to rainbow looking screen.
In addition, have the brightness by default to 1, so that specifying 0
actually does the expected behaviour of leading to a black screen.
Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Reviewed-by: Matthias Hopf <mhopf@suse.de>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
commit ccb3f8a42b25819cd1812f179544b52c2f03d1aa
Author: Yann Droneaud <ydroneaud@mandriva.com>
Date: Tue Nov 17 15:39:02 2009 +0100
xrandr: Remove --clone / --extend support code
Code handling --clone and --extend is not used.
The usage message regarding those options was already commented out.
Signed-off-by: Yann Droneaud <ydroneaud@mandriva.com>
Acked-by: Matthias Hopf <mhopf@suse.de>
commit 1f8e27cd71560c154f6b1f7472ae2518f5df10e0
Author: Matthias Hopf <mhopf@suse.de>
Date: Tue Jan 5 14:58:42 2010 +0100
Language fixes.
commit 5f7d052d63875f059f5693c68ee9fdf559ad5300
Author: Yann Droneaud <ydroneaud@mandriva.com>
Date: Tue Nov 17 15:39:01 2009 +0100
xrandr: Use a prefix for enum type _policy and _relation like other enums in xrandr.c
Try to apply the same coding style to enum _policy and enum _relation.
This patch also workarounds bug #12958 .
Signed-off-by: Yann Droneaud <ydroneaud@mandriva.com>
Acked-by: Matthias Hopf <mhopf@suse.de>
commit b481bd0df87c6b474d8c443b6590bbafac482485
Author: Mikhail Gusarov <dottedmag@dottedmag.net>
Date: Sun Oct 25 03:41:05 2009 +0600
Add --brightness for CRTC
--brightness n.m adjusts gamma set for CRTC in order to compensate
for overly bright or overly dark unmanageable outputs.
Signed-off-by: Matthias Hopf <mhopf@suse.de>
commit 7d463218c584b683c9946cbff44bc69115eaa11b
Author: Matthias Hopf <mhopf@suse.de>
Date: Sun Jan 3 00:40:19 2010 +0100
xrandr: add more information about the transform option in the manpage
Add information about the transformation, stating it's a homogeneous
coordinate transformation and adding the (simplified) pixel calculation
formula. Also and an example of keystone shaping generated using the algorithm
found in xkeystone.
Based on a patch by Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Matthias Hopf <mhopf@suse.de>
commit 27f86db064a5ea60b942fd3d3ddeb462d980df9b
Author: Dominik Jasiok <yahoo.com.pl@gmail.com>
Date: Tue Dec 22 10:48:04 2009 -0800
xrandr: check_strtod should return double, not int
check_strtod performs error checking around strtod to ensure that
arguments are correctly processed. However, it also accidentally(?)
cast the result to int, which was then universally cast back to double
by all callers. Narrowing and re-widening the type doesn't make any sense.
Signed-off-by: Keith Packard <keithp@keithp.com>
commit df254d851cae1dcd1032e307bc828a5800e7342c
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Thu Nov 26 09:19:54 2009 -0500
Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
Now that the INSTALL file is generated.
Allows running make maintainer-clean.
commit 22c90544537e661b71705c59e35616abb5aa4e55
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Wed Oct 28 14:09:08 2009 -0400
INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
Add missing INSTALL file. Use standard GNU file on building tarball
README may have been updated
Remove AUTHORS file as it is empty and no content available yet.
Remove NEWS file as it is empty and no content available yet.
commit 35ffd6a8768e16d6fc7bc7c840e35a7802796b21
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Tue Oct 27 15:07:25 2009 -0400
Deploy the new XORG_DEFAULT_OPTIONS #24242
This macro aggregate a number of existing macros that sets commmon
X.Org components configuration options. It shields the configuration file from
future changes.
commit a397f434db4f30e22534b8fe684b8f67f493db40
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Mon Oct 26 22:08:39 2009 -0400
Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
ChangeLog filename is known to Automake and requires no further
coding in the makefile.
commit 436a873b54990b77ac8024e20284de53c58c7850
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Thu Oct 22 12:34:16 2009 -0400
.gitignore: use common defaults with custom section # 24239
Using common defaults will reduce errors and maintenance.
Only the very small or inexistent custom section need periodic maintenance
when the structure of the component changes. Do not edit defaults.
commit b81a4976701606d1406ff56b91f13331e5f35860
Author: Yann Droneaud <ydroneaud@mandriva.com>
Date: Tue Nov 17 10:34:41 2009 +0100
xrandr: Remove test against RANDR_MAJOR/RANDR_MINOR
xrandr.c uses structures defined in <X11/extensions/Xrandr.h>
provided by 'libXrandr' package but tests structures availability
through RANDR_MAJOR/RANDR_MINOR defined in <X11/extensions/randr.h>
provided by 'randrproto' package.
Sometimes they are not in sync so it's safer to rely on checks made
by configure script through pkg-config.
In my test case, XRRPanning structure is not defined in Xrandr.h,
RANDR_MAJOR is 1 and RANDR_MINOR 2 but xrandr.c try to use it anyway.
(for the record, XRRPanning was added in libXrandr-1.2.91).
Signed-off-by: Yann Droneaud <ydroneaud@mandriva.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
commit b84560759141ed52b8779c184184f888e9be8b2f
Author: Éric Piel <eric.piel@tremplin-utc.net>
Date: Mon Oct 26 14:11:02 2009 +0100
xrandr: do not segfault when "--scale" or "--transform" have no output
"xrandr --scale 2x2" segfaults, because the --scale (and --transform)
options do not check for an existing output.
Make sure there is an output specified (like every other options).
Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Matthias Hopf <mhopf@suse.de>
commit 34829957441a10f6b6e31141aa1018f7a72aeaf9
Author: Éric Piel <eric.piel@tremplin-utc.net>
Date: Mon Oct 26 13:57:10 2009 +0100
xrandr: make --query really the default option
The manpage states that "--query" is the default action when nothing
specific is requested. However, some options such as "-display" or
"--screen" lead to do nothing by default. This makes sure that unless
something specific is requested, query is done.
This also restores the behaviour of --q1 to the same one as the old
xrandr: also display the info on rotation and reflection by default.
Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Matthias Hopf <mhopf@suse.de>
commit 07bf47f32b1f4c256e32b5b47ab52ef55605370a
Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
Date: Wed Oct 21 12:47:21 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 8d2702cae3b6a78cfd8d480dfb8209091917af2a
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Thu Oct 1 14:54:29 2009 -0700
Add README with pointers to mailing lists, bugzilla, & git
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
commit 5da0cb3533aa829588b2e6d715d511691fa1e45f
Author: Matthias Hopf <mhopf@suse.de>
Date: Thu Sep 10 13:18:35 2009 +0200
@ -298,7 +576,7 @@ Date: Mon Dec 1 21:45:47 2008 +0100
Fix build outside of the source dir
commit 63ba316bcbe8ad61ba63d9fe62c82e7d56dcc399
Merge: a813c4d... 1b95e32...
Merge: a813c4d 1b95e32
Author: Julien Cristau <jcristau@debian.org>
Date: Mon Dec 1 21:33:35 2008 +0100
@ -776,7 +1054,7 @@ Date: Sun Feb 18 21:27:55 2007 -0800
Update version number to 1.2.0 for release.
commit 13cef2baa884039e96f5dfd9245bb949aed99448
Merge: 065f09c... a175972...
Merge: 065f09c a175972
Author: Keith Packard <keithp@neko.keithp.com>
Date: Sun Feb 18 21:26:50 2007 -0800
@ -818,7 +1096,7 @@ Date: Sat Feb 10 16:14:58 2007 -0800
Display set of available CRTCs per output in --verbose mode.
commit 067cafb5cda0aa6e34773e888fd469ff657760c2
Merge: 7c25c24... b0a00df...
Merge: 7c25c24 b0a00df
Author: Keith Packard <keithp@guitar.keithp.com>
Date: Wed Jan 31 15:25:35 2007 -0800
@ -977,7 +1255,7 @@ Date: Tue Dec 19 16:27:46 2006 -0800
Actually respect the --fb option
commit 7b32611632ab08b6a123db5df1c2b919b3a12104
Merge: a0df3aa... 4bb1a9c...
Merge: a0df3aa 4bb1a9c
Author: Keith Packard <keithp@guitar.keithp.com>
Date: Tue Dec 19 15:58:38 2006 -0800
@ -990,7 +1268,7 @@ Date: Tue Dec 19 15:58:21 2006 -0800
Correct format for sscanf to double variable "dpi"
commit 4bb1a9cd6f9cc3ed61d7913528afa3f573092833
Merge: b6c0382... 6ef400f...
Merge: b6c0382 6ef400f
Author: Keith Packard <keithp@bouzouki.jf.intel.com>
Date: Wed Dec 13 11:36:36 2006 -0800

View File

@ -1,6 +1,297 @@
Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
2006, 2007, 2008 Free Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You need `configure.ac' if
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system.
Running `configure' might take a while. While running, it prints
some messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
6. Often, you can also type `make uninstall' to remove the installed
files again.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
With a non-GNU `make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
installed the package for one architecture, use `make distclean' before
reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple `-arch' options to the
compiler but only a single `-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CPP="gcc -E" CXXCPP="g++ -E"
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
using the `lipo' tool if you have problems.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Particular systems
==================
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
CC is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
a workaround. If GNU CC is not installed, it is therefore recommended
to try
./configure CC="cc"
and if that doesn't work, try
./configure CC="cc -nodtk"
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf bug. Until the bug is fixed you can use this workaround:
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of all of the options to `configure', and exit.
`--help=short'
`--help=recursive'
Print a summary of the options unique to this package's
`configure', and exit. The `short' variant lists options used
only in the top level, while the `recursive' variant lists options
also present in any nested packages.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--prefix=DIR'
Use DIR as the installation prefix. *Note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
`--no-create'
`-n'
Run the configure checks, but stop before creating any output
files.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
Software Foundation, Inc.

View File

@ -30,7 +30,7 @@ xkeystone: keystone.5c
clean-local:
rm -f xkeystone
AM_CFLAGS = $(XRANDR_CFLAGS)
AM_CFLAGS = $(XRANDR_CFLAGS) $(CWARNFLAGS)
xrandr_LDADD = $(XRANDR_LIBS)
xrandr_SOURCES = \
@ -44,6 +44,7 @@ appmandir = $(APP_MAN_DIR)
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
EXTRA_DIST = $(appman_PRE) xrandr_test.pl keystone.5c
MAINTAINERCLEANFILES = ChangeLog INSTALL
CLEANFILES = $(appman_DATA)
SED = sed
@ -70,13 +71,14 @@ SUFFIXES = .$(APP_MAN_SUFFIX) .man
.man.$(APP_MAN_SUFFIX):
sed $(MAN_SUBSTS) < $< > $@
EXTRA_DIST += ChangeLog
MAINTAINERCLEANFILES = ChangeLog
.PHONY: ChangeLog
.PHONY: ChangeLog INSTALL
INSTALL:
$(INSTALL_CMD)
ChangeLog:
$(CHANGELOG_CMD)
dist-hook: ChangeLog
dist-hook: ChangeLog INSTALL

View File

@ -113,12 +113,14 @@ 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@
@ -145,6 +147,7 @@ EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@ -159,6 +162,19 @@ MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MAN_SUBSTS = \
-e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-e 's|__xservername__|Xorg|g' \
-e 's|__xconfigfile__|xorg.conf|g' \
-e 's|__projectroot__|$(prefix)|g' \
-e 's|__apploaddir__|$(appdefaultdir)|' \
-e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
OBJEXT = @OBJEXT@
@ -170,10 +186,12 @@ 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@
VERSION = @VERSION@
XORG_MAN_PAGE = @XORG_MAN_PAGE@
XRANDR_CFLAGS = @XRANDR_CFLAGS@
XRANDR_LIBS = @XRANDR_LIBS@
ac_ct_CC = @ac_ct_CC@
@ -192,7 +210,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@
@ -221,7 +238,7 @@ sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
bin_SCRIPTS = xkeystone
AM_CFLAGS = $(XRANDR_CFLAGS)
AM_CFLAGS = $(XRANDR_CFLAGS) $(CWARNFLAGS)
xrandr_LDADD = $(XRANDR_LIBS)
xrandr_SOURCES = \
xrandr.c
@ -231,28 +248,14 @@ appman_PRE = \
appmandir = $(APP_MAN_DIR)
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
EXTRA_DIST = $(appman_PRE) xrandr_test.pl keystone.5c ChangeLog
EXTRA_DIST = $(appman_PRE) xrandr_test.pl keystone.5c
MAINTAINERCLEANFILES = ChangeLog INSTALL
CLEANFILES = $(appman_DATA)
SED = sed
# Strings to replace in man pages
XORGRELSTRING = @PACKAGE_STRING@
XORGMANNAME = X Version 11
MAN_SUBSTS = \
-e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-e 's|__xservername__|Xorg|g' \
-e 's|__xconfigfile__|xorg.conf|g' \
-e 's|__projectroot__|$(prefix)|g' \
-e 's|__apploaddir__|$(appdefaultdir)|' \
-e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
SUFFIXES = .$(APP_MAN_SUFFIX) .man
MAINTAINERCLEANFILES = ChangeLog
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
@ -264,15 +267,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
cd $(srcdir) && $(AUTOMAKE) --gnu \
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
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 \
@ -684,12 +687,15 @@ clean-local:
.man.$(APP_MAN_SUFFIX):
sed $(MAN_SUBSTS) < $< > $@
.PHONY: ChangeLog
.PHONY: ChangeLog INSTALL
INSTALL:
$(INSTALL_CMD)
ChangeLog:
$(CHANGELOG_CMD)
dist-hook: ChangeLog
dist-hook: ChangeLog INSTALL
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,26 @@
xrandr - primitive command line interface to X11 Resize, Rotate, and Reflect
(RandR) extension
All questions regarding this software should be directed at the
Xorg mailing list:
http://lists.freedesktop.org/mailman/listinfo/xorg
Please submit bug reports to the Xorg bugzilla:
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
The master development code repository can be found at:
git://anongit.freedesktop.org/git/xorg/app/xrandr
http://cgit.freedesktop.org/xorg/app/xrandr
For patch submission instructions, see:
http://www.x.org/wiki/Development/Documentation/SubmittingPatches
For more information on the git code manager, see:
http://wiki.x.org/wiki/GitPage

775
app/xrandr/aclocal.m4 vendored
View File

@ -1000,29 +1000,23 @@ dnl
dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the
dnl "Software"), to deal in the Software without restriction, including
dnl without limitation the rights to use, copy, modify, merge, publish,
dnl distribute, and/or sell copies of the Software, and to permit persons
dnl to whom the Software is furnished to do so, provided that the above
dnl copyright notice(s) and this permission notice appear in all copies of
dnl the Software and that both the above copyright notice(s) and this
dnl permission notice appear in supporting documentation.
dnl copy of this software and associated documentation files (the "Software"),
dnl to deal in the Software without restriction, including without limitation
dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
dnl and/or sell copies of the Software, and to permit persons to whom the
dnl Software is furnished to do so, subject to the following conditions:
dnl
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
dnl The above copyright notice and this permission notice (including the next
dnl paragraph) shall be included in all copies or substantial portions of the
dnl Software.
dnl
dnl Except as contained in this notice, the name of a copyright holder
dnl shall not be used in advertising or otherwise to promote the sale, use
dnl or other dealings in this Software without prior written authorization
dnl of the copyright holder.
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
dnl DEALINGS IN THE SOFTWARE.
# XORG_MACROS_VERSION(required-version)
# -------------------------------------
@ -1040,7 +1034,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.8.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,,
@ -1108,9 +1102,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
@ -1179,8 +1176,52 @@ 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|__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])
])
if test "x$XORG_SGML_PATH" != "x" ; then
AC_MSG_RESULT([$XORG_SGML_PATH])
else
AC_MSG_RESULT([no])
fi
AC_SUBST(XORG_SGML_PATH)
]) # XORG_CHECK_SGML_DOCTOOLS
# XORG_CHECK_LINUXDOC
# -------------------
# Minimum version: 1.0.0
@ -1190,23 +1231,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
@ -1216,9 +1248,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
@ -1228,7 +1260,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"
@ -1248,48 +1280,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
@ -1307,6 +1335,490 @@ AC_SUBST(MAKE_PDF)
AC_SUBST(MAKE_HTML)
]) # XORG_CHECK_DOCBOOK
# XORG_WITH_XMLTO([MIN-VERSION])
# ----------------
# Minimum version: 1.5.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-xmlto option, it allows maximum flexibilty in making decisions
# as whether or not to use the xmlto package.
#
# Interface to module:
# HAVE_XMLTO: used in makefiles to conditionally generate documentation
# XMLTO: returns the path of the xmlto program found
# returns the path set by the user in the environment
# --with-xmlto: 'yes' user instructs the module to use xmlto
# 'no' user instructs the module not to use xmlto
#
# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
#
AC_DEFUN([XORG_WITH_XMLTO],[
AC_ARG_VAR([XMLTO], [Path to xmlto command])
AC_ARG_WITH(xmlto,
AS_HELP_STRING([--with-xmlto],
[Use xmlto to regenerate documentation (default: yes, if installed)]),
[use_xmlto=$withval], [use_xmlto=auto])
if test "x$use_xmlto" = x"auto"; then
AC_PATH_PROG([XMLTO], [xmlto])
if test "x$XMLTO" = "x"; then
AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
have_xmlto=no
else
have_xmlto=yes
fi
elif test "x$use_xmlto" = x"yes" ; then
AC_PATH_PROG([XMLTO], [xmlto])
if test "x$XMLTO" = "x"; then
AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
fi
have_xmlto=yes
elif test "x$use_xmlto" = x"no" ; then
if test "x$XMLTO" != "x"; then
AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
fi
have_xmlto=no
else
AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
fi
m4_ifval([$1],
[if test "$have_xmlto" = yes; then
# scrape the xmlto version
AC_MSG_CHECKING([the xmlto version])
xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
AC_MSG_RESULT([$xmlto_version])
AS_VERSION_COMPARE([$xmlto_version], [$1],
[if test "x$use_xmlto" = xauto; then
AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
have_xmlto=no
else
AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
fi])
fi])
AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
]) # XORG_WITH_XMLTO
# XORG_WITH_ASCIIDOC([MIN-VERSION])
# ----------------
# Minimum version: 1.5.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-asciidoc option, it allows maximum flexibilty in making decisions
# as whether or not to use the asciidoc package.
#
# Interface to module:
# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
# ASCIIDOC: returns the path of the asciidoc program found
# returns the path set by the user in the environment
# --with-asciidoc: 'yes' user instructs the module to use asciidoc
# 'no' user instructs the module not to use asciidoc
#
# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
#
AC_DEFUN([XORG_WITH_ASCIIDOC],[
AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
AC_ARG_WITH(asciidoc,
AS_HELP_STRING([--with-asciidoc],
[Use asciidoc to regenerate documentation (default: yes, if installed)]),
[use_asciidoc=$withval], [use_asciidoc=auto])
if test "x$use_asciidoc" = x"auto"; then
AC_PATH_PROG([ASCIIDOC], [asciidoc])
if test "x$ASCIIDOC" = "x"; then
AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
have_asciidoc=no
else
have_asciidoc=yes
fi
elif test "x$use_asciidoc" = x"yes" ; then
AC_PATH_PROG([ASCIIDOC], [asciidoc])
if test "x$ASCIIDOC" = "x"; then
AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
fi
have_asciidoc=yes
elif test "x$use_asciidoc" = x"no" ; then
if test "x$ASCIIDOC" != "x"; then
AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
fi
have_asciidoc=no
else
AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
fi
m4_ifval([$1],
[if test "$have_asciidoc" = yes; then
# scrape the asciidoc version
AC_MSG_CHECKING([the asciidoc version])
asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
AC_MSG_RESULT([$asciidoc_version])
AS_VERSION_COMPARE([$asciidoc_version], [$1],
[if test "x$use_asciidoc" = xauto; then
AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
have_asciidoc=no
else
AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
fi])
fi])
AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
]) # XORG_WITH_ASCIIDOC
# XORG_WITH_DOXYGEN([MIN-VERSION])
# --------------------------------
# Minimum version: 1.5.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-doxygen option, it allows maximum flexibilty in making decisions
# as whether or not to use the doxygen package.
#
# Interface to module:
# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
# DOXYGEN: returns the path of the doxygen program found
# returns the path set by the user in the environment
# --with-doxygen: 'yes' user instructs the module to use doxygen
# 'no' user instructs the module not to use doxygen
#
# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
#
AC_DEFUN([XORG_WITH_DOXYGEN],[
AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
AC_ARG_WITH(doxygen,
AS_HELP_STRING([--with-doxygen],
[Use doxygen to regenerate documentation (default: yes, if installed)]),
[use_doxygen=$withval], [use_doxygen=auto])
if test "x$use_doxygen" = x"auto"; then
AC_PATH_PROG([DOXYGEN], [doxygen])
if test "x$DOXYGEN" = "x"; then
AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
have_doxygen=no
else
have_doxygen=yes
fi
elif test "x$use_doxygen" = x"yes" ; then
AC_PATH_PROG([DOXYGEN], [doxygen])
if test "x$DOXYGEN" = "x"; then
AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
fi
have_doxygen=yes
elif test "x$use_doxygen" = x"no" ; then
if test "x$DOXYGEN" != "x"; then
AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
fi
have_doxygen=no
else
AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
fi
m4_ifval([$1],
[if test "$have_doxygen" = yes; then
# scrape the doxygen version
AC_MSG_CHECKING([the doxygen version])
doxygen_version=`$DOXYGEN --version 2>/dev/null`
AC_MSG_RESULT([$doxygen_version])
AS_VERSION_COMPARE([$doxygen_version], [$1],
[if test "x$use_doxygen" = xauto; then
AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
have_doxygen=no
else
AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
fi])
fi])
AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
]) # XORG_WITH_DOXYGEN
# XORG_WITH_GROFF
# ----------------
# Minimum version: 1.6.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-groff option, it allows maximum flexibilty in making decisions
# as whether or not to use the groff package.
#
# Interface to module:
# HAVE_GROFF: used in makefiles to conditionally generate documentation
# HAVE_GROFF_MM: the memorandum macros (-mm) package
# HAVE_GROFF_MS: the -ms macros package
# GROFF: returns the path of the groff program found
# returns the path set by the user in the environment
# --with-groff: 'yes' user instructs the module to use groff
# 'no' user instructs the module not to use groff
#
# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
#
# OS and distros often splits groff in a basic and full package, the former
# having the groff program and the later having devices, fonts and macros
# Checking for the groff executable is not enough.
#
# If macros are missing, we cannot assume that groff is useless, so we don't
# unset HAVE_GROFF or GROFF env variables.
# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
#
AC_DEFUN([XORG_WITH_GROFF],[
AC_ARG_VAR([GROFF], [Path to groff command])
AC_ARG_WITH(groff,
AS_HELP_STRING([--with-groff],
[Use groff to regenerate documentation (default: yes, if installed)]),
[use_groff=$withval], [use_groff=auto])
if test "x$use_groff" = x"auto"; then
AC_PATH_PROG([GROFF], [groff])
if test "x$GROFF" = "x"; then
AC_MSG_WARN([groff not found - documentation targets will be skipped])
have_groff=no
else
have_groff=yes
fi
elif test "x$use_groff" = x"yes" ; then
AC_PATH_PROG([GROFF], [groff])
if test "x$GROFF" = "x"; then
AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
fi
have_groff=yes
elif test "x$use_groff" = x"no" ; then
if test "x$GROFF" != "x"; then
AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
fi
have_groff=no
else
AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
fi
# We have groff, test for the presence of the macro packages
if test "x$have_groff" = x"yes"; then
AC_MSG_CHECKING([for ${GROFF} -ms macros])
if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
groff_ms_works=yes
else
groff_ms_works=no
fi
AC_MSG_RESULT([$groff_ms_works])
AC_MSG_CHECKING([for ${GROFF} -mm macros])
if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
groff_mm_works=yes
else
groff_mm_works=no
fi
AC_MSG_RESULT([$groff_mm_works])
fi
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])
]) # XORG_WITH_GROFF
# XORG_WITH_FOP
# ----------------
# Minimum version: 1.6.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-fop option, it allows maximum flexibilty in making decisions
# as whether or not to use the fop package.
#
# Interface to module:
# HAVE_FOP: used in makefiles to conditionally generate documentation
# FOP: returns the path of the fop program found
# returns the path set by the user in the environment
# --with-fop: 'yes' user instructs the module to use fop
# 'no' user instructs the module not to use fop
#
# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
#
AC_DEFUN([XORG_WITH_FOP],[
AC_ARG_VAR([FOP], [Path to fop command])
AC_ARG_WITH(fop,
AS_HELP_STRING([--with-fop],
[Use fop to regenerate documentation (default: yes, if installed)]),
[use_fop=$withval], [use_fop=auto])
if test "x$use_fop" = x"auto"; then
AC_PATH_PROG([FOP], [fop])
if test "x$FOP" = "x"; then
AC_MSG_WARN([fop not found - documentation targets will be skipped])
have_fop=no
else
have_fop=yes
fi
elif test "x$use_fop" = x"yes" ; then
AC_PATH_PROG([FOP], [fop])
if test "x$FOP" = "x"; then
AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
fi
have_fop=yes
elif test "x$use_fop" = x"no" ; then
if test "x$FOP" != "x"; then
AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
fi
have_fop=no
else
AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
fi
AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
]) # XORG_WITH_FOP
# XORG_WITH_PS2PDF
# ----------------
# Minimum version: 1.6.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
# as whether or not to use the ps2pdf package.
#
# Interface to module:
# HAVE_PS2PDF: used in makefiles to conditionally generate documentation
# PS2PDF: returns the path of the ps2pdf program found
# returns the path set by the user in the environment
# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
# 'no' user instructs the module not to use ps2pdf
#
# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
#
AC_DEFUN([XORG_WITH_PS2PDF],[
AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
AC_ARG_WITH(ps2pdf,
AS_HELP_STRING([--with-ps2pdf],
[Use ps2pdf to regenerate documentation (default: yes, if installed)]),
[use_ps2pdf=$withval], [use_ps2pdf=auto])
if test "x$use_ps2pdf" = x"auto"; then
AC_PATH_PROG([PS2PDF], [ps2pdf])
if test "x$PS2PDF" = "x"; then
AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
have_ps2pdf=no
else
have_ps2pdf=yes
fi
elif test "x$use_ps2pdf" = x"yes" ; then
AC_PATH_PROG([PS2PDF], [ps2pdf])
if test "x$PS2PDF" = "x"; then
AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
fi
have_ps2pdf=yes
elif test "x$use_ps2pdf" = x"no" ; then
if test "x$PS2PDF" != "x"; then
AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
fi
have_ps2pdf=no
else
AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
fi
AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
]) # XORG_WITH_PS2PDF
# XORG_ENABLE_DOCS (enable_docs=yes)
# ----------------
# Minimum version: 1.6.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a builder to skip all
# documentation targets except traditional man pages.
# Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building.
# Refer to:
# XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc
# XORG_WITH_DOXYGEN --with-doxygen
# XORG_WITH_FOP --with-fop
# XORG_WITH_GROFF --with-groff
# XORG_WITH_PS2PDF --with-ps2pdf
#
# Interface to module:
# ENABLE_DOCS: used in makefiles to conditionally generate documentation
# --enable-docs: 'yes' user instructs the module to generate docs
# 'no' user instructs the module not to generate docs
# parm1: specify the default value, yes or no.
#
AC_DEFUN([XORG_ENABLE_DOCS],[
default=$1
if test "x$default" = x ; then
default="yes"
fi
AC_ARG_ENABLE(docs,
AS_HELP_STRING([--enable-docs],
[Enable building the documentation (default: yes)]),
[build_docs=$enableval], [build_docs=$default])
AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
AC_MSG_CHECKING([whether to build documentation])
AC_MSG_RESULT([$build_docs])
]) # XORG_ENABLE_DOCS
# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
# ----------------
# Minimum version: 1.6.0
#
# This macro enables a builder to skip all developer documentation.
# Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building.
# Refer to:
# XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc
# XORG_WITH_DOXYGEN --with-doxygen
# XORG_WITH_FOP --with-fop
# XORG_WITH_GROFF --with-groff
# XORG_WITH_PS2PDF --with-ps2pdf
#
# Interface to module:
# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs
# --enable-devel-docs: 'yes' user instructs the module to generate developer docs
# 'no' user instructs the module not to generate developer docs
# parm1: specify the default value, yes or no.
#
AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
devel_default=$1
if test "x$devel_default" = x ; then
devel_default="yes"
fi
AC_ARG_ENABLE(devel-docs,
AS_HELP_STRING([--enable-devel-docs],
[Enable building the developer documentation (default: yes)]),
[build_devel_docs=$enableval], [build_devel_docs=$devel_default])
AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
AC_MSG_CHECKING([whether to build developer documentation])
AC_MSG_RESULT([$build_devel_docs])
]) # XORG_ENABLE_DEVEL_DOCS
# XORG_ENABLE_SPECS (enable_specs=yes)
# ----------------
# Minimum version: 1.6.0
#
# This macro enables a builder to skip all functional specification targets.
# Combined with the specific tool checking macros XORG_WITH_*, it provides
# maximum flexibilty in controlling documentation building.
# Refer to:
# XORG_WITH_XMLTO --with-xmlto
# XORG_WITH_ASCIIDOC --with-asciidoc
# XORG_WITH_DOXYGEN --with-doxygen
# XORG_WITH_FOP --with-fop
# XORG_WITH_GROFF --with-groff
# XORG_WITH_PS2PDF --with-ps2pdf
#
# Interface to module:
# ENABLE_SPECS: used in makefiles to conditionally generate specs
# --enable-specs: 'yes' user instructs the module to generate specs
# 'no' user instructs the module not to generate specs
# parm1: specify the default value, yes or no.
#
AC_DEFUN([XORG_ENABLE_SPECS],[
spec_default=$1
if test "x$spec_default" = x ; then
spec_default="yes"
fi
AC_ARG_ENABLE(specs,
AS_HELP_STRING([--enable-specs],
[Enable building the specs (default: yes)]),
[build_specs=$enableval], [build_specs=$spec_default])
AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
AC_MSG_CHECKING([whether to build functional specifications])
AC_MSG_RESULT([$build_specs])
]) # XORG_ENABLE_SPECS
# XORG_CHECK_MALLOC_ZERO
# ----------------------
# Minimum version: 1.0.0
@ -1336,7 +1848,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])
@ -1359,38 +1872,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"
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
AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
fi
AC_SUBST(LINT)
AC_SUBST(LINT_FLAGS)
AM_CONDITIONAL(LINT, [test x$LINT != xno])
# User supplied flags override default flags
if test "x$LINT_FLAGS" != "x"; then
lint_options=$LINT_FLAGS
fi
AC_SUBST([LINT_FLAGS],[$lint_options])
AM_CONDITIONAL(LINT, [test "x$LINT" != x])
]) # XORG_WITH_LINT
@ -1400,28 +1944,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])
@ -1434,11 +1979,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"
@ -1451,7 +1996,6 @@ else
fi
fi
AC_SUBST(CWARNFLAGS)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
]) # XORG_CWARNFLAGS
# XORG_STRICT_OPTION
@ -1460,7 +2004,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])
@ -1490,12 +2034,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
@ -1523,22 +2088,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])
@ -1565,13 +2117,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

2298
app/xrandr/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -21,29 +21,26 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ([2.57])
AC_INIT(xrandr,[1.3.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xrandr)
AM_INIT_AUTOMAKE([dist-bzip2])
AC_INIT(xrandr,[1.3.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xrandr)
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG
m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.2)
# Require xorg-macros: XORG_DEFAULT_OPTIONS
m4_ifndef([XORG_MACROS_VERSION],
[m4_fatal([must install xorg-macros 1.4 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.4)
XORG_DEFAULT_OPTIONS
AM_CONFIG_HEADER(config.h)
AC_PROG_CC
AC_PROG_INSTALL
XORG_CWARNFLAGS
AC_CHECK_LIB(m,floor)
# Checks for pkg-config packages
PKG_CHECK_MODULES(XRANDR, xrandr >= 1.3 xrender x11)
XRANDR_CFLAGS="$CWARNFLAGS $XRANDR_CFLAGS"
AC_SUBST(XRANDR_CFLAGS)
AC_SUBST(XRANDR_LIBS)
XORG_MANPAGE_SECTIONS
XORG_RELEASE_VERSION
XORG_CHANGELOG
AC_OUTPUT([Makefile])

View File

@ -39,10 +39,6 @@
#include "config.h"
#if RANDR_MAJOR > 1 || (RANDR_MAJOR == 1 && RANDR_MINOR >= 2)
#define HAS_RANDR_1_2 1
#endif
static char *program_name;
static Display *dpy;
static Window root;
@ -111,15 +107,10 @@ usage(void)
fprintf(stderr, " --verbose\n");
fprintf(stderr, " --dryrun\n");
fprintf(stderr, " --nograb\n");
#if HAS_RANDR_1_2
fprintf(stderr, " --prop or --properties\n");
fprintf(stderr, " --fb <width>x<height>\n");
fprintf(stderr, " --fbmm <width>x<height>\n");
fprintf(stderr, " --dpi <dpi>/<output>\n");
#if 0
fprintf(stderr, " --clone\n");
fprintf(stderr, " --extend\n");
#endif
fprintf(stderr, " --output <output>\n");
fprintf(stderr, " --auto\n");
fprintf(stderr, " --mode <mode>\n");
@ -149,7 +140,6 @@ usage(void)
fprintf(stderr, " --rmmode <name>\n");
fprintf(stderr, " --addmode <output> <name>\n");
fprintf(stderr, " --delmode <output> <name>\n");
#endif
exit(1);
/*NOTREACHED*/
@ -179,6 +169,12 @@ warning (const char *format, ...)
va_end (ap);
}
/* Because fmin requires C99 suppport */
static inline double dmin (double x, double y)
{
return x < y ? x : y;
}
static char *
rotation_name (Rotation rotation)
{
@ -209,13 +205,12 @@ reflection_name (Rotation rotation)
return "invalid reflection";
}
#if HAS_RANDR_1_2
typedef enum _policy {
clone, extend
} policy_t;
typedef enum _relation {
left_of, right_of, above, below, same_as,
relation_left_of,
relation_right_of,
relation_above,
relation_below,
relation_same_as,
} relation_t;
typedef struct {
@ -333,6 +328,8 @@ struct _output {
float blue;
} gamma;
float brightness;
Bool primary;
Bool found;
@ -635,6 +632,7 @@ add_output (void)
fatal ("out of memory\n");
output->next = NULL;
output->found = False;
output->brightness = 1.0;
*outputs_tail = output;
outputs_tail = &output->next;
return output;
@ -945,6 +943,96 @@ output_is_primary(output_t *output)
return False;
}
/* Returns the index of the last value in an array < 0xffff */
static int
find_last_non_clamped(CARD16 array[], int size) {
int i;
for (i = size - 1; i > 0; i--) {
if (array[i] < 0xffff)
return i;
}
return 0;
}
static void
set_gamma_info(output_t *output)
{
XRRCrtcGamma *gamma;
double i1, v1, i2, v2;
int size, middle, last_best, last_red, last_green, last_blue;
CARD16 *best_array;
if (!output->crtc_info)
return;
size = XRRGetCrtcGammaSize(dpy, output->crtc_info->crtc.xid);
if (!size) {
warning("Failed to get size of gamma for output %s\n", output->output.string);
return;
}
gamma = XRRGetCrtcGamma(dpy, output->crtc_info->crtc.xid);
if (!gamma) {
warning("Failed to get gamma for output %s\n", output->output.string);
return;
}
/*
* Here is a bit tricky because gamma is a whole curve for each
* color. So, typically, we need to represent 3 * 256 values as 3 + 1
* values. Therefore, we approximate the gamma curve (v) by supposing
* it always follows the way we set it: a power function (i^g)
* multiplied by a brightness (b).
* v = i^g * b
* so g = (ln(v) - ln(b))/ln(i)
* and b can be found using two points (v1,i1) and (v2, i2):
* b = e^((ln(v2)*ln(i1) - ln(v1)*ln(i2))/ln(i1/i2))
* For the best resolution, we select i2 at the highest place not
* clamped and i1 at i2/2. Note that if i2 = 1 (as in most normal
* cases), then b = v2.
*/
last_red = find_last_non_clamped(gamma->red, size);
last_green = find_last_non_clamped(gamma->green, size);
last_blue = find_last_non_clamped(gamma->blue, size);
best_array = gamma->red;
last_best = last_red;
if (last_green > last_best) {
last_best = last_green;
best_array = gamma->green;
}
if (last_blue > last_best) {
last_best = last_blue;
best_array = gamma->blue;
}
if (last_best == 0)
last_best = 1;
middle = last_best / 2;
i1 = (double)(middle + 1) / size;
v1 = (double)(best_array[middle]) / 65535;
i2 = (double)(last_best + 1) / size;
v2 = (double)(best_array[last_best]) / 65535;
if (v2 < 0.0001) { /* The screen is black */
output->brightness = 0;
output->gamma.red = 1;
output->gamma.green = 1;
output->gamma.blue = 1;
} else {
if ((last_best + 1) == size)
output->brightness = v2;
else
output->brightness = exp((log(v2)*log(i1) - log(v1)*log(i2))/log(i1/i2));
output->gamma.red = log((double)(gamma->red[last_red / 2]) / output->brightness
/ 65535) / log((double)((last_red / 2) + 1) / size);
output->gamma.green = log((double)(gamma->green[last_green / 2]) / output->brightness
/ 65535) / log((double)((last_green / 2) + 1) / size);
output->gamma.blue = log((double)(gamma->blue[last_blue / 2]) / output->brightness
/ 65535) / log((double)((last_blue / 2) + 1) / size);
}
XRRFreeGamma(gamma);
}
static void
set_output_info (output_t *output, RROutput xid, XRROutputInfo *output_info)
{
@ -1057,6 +1145,10 @@ set_output_info (output_t *output, RROutput xid, XRROutputInfo *output_info)
rotation_name (output->rotation),
reflection_name (output->rotation));
/* set gamma */
if (!(output->changes & changes_gamma))
set_gamma_info(output);
/* set transformation */
if (!(output->changes & changes_transform))
{
@ -1099,9 +1191,7 @@ get_crtcs (void)
for (c = 0; c < res->ncrtc; c++)
{
XRRCrtcInfo *crtc_info = XRRGetCrtcInfo (dpy, res, res->crtcs[c]);
#if RANDR_MAJOR > 1 || RANDR_MINOR >= 3
XRRCrtcTransformAttributes *attr;
#endif
XRRPanning *panning_info = NULL;
if (has_1_3) {
@ -1127,7 +1217,6 @@ get_crtcs (void)
crtcs[c].y = 0;
crtcs[c].rotation = RR_Rotate_0;
}
#if RANDR_MAJOR > 1 || RANDR_MINOR >= 3
if (XRRGetCrtcTransform (dpy, res->crtcs[c], &attr) && attr) {
set_transform (&crtcs[c].current_transform,
&attr->currentTransform,
@ -1137,7 +1226,6 @@ get_crtcs (void)
XFree (attr);
}
else
#endif
{
init_transform (&crtcs[c].current_transform);
}
@ -1226,24 +1314,30 @@ set_gamma(void)
continue;
}
if(output->gamma.red == 0.0 && output->gamma.green == 0.0 && output->gamma.blue == 0.0)
output->gamma.red = output->gamma.green = output->gamma.blue = 1.0;
for (i = 0; i < size; i++) {
if (output->gamma.red == 1.0)
gamma->red[i] = i << 8;
if (output->gamma.red == 1.0 && output->brightness == 1.0)
gamma->red[i] = (i << 8) + i;
else
gamma->red[i] = (CARD16)(pow((double)i/(double)(size - 1),
(double)output->gamma.red) * (double)(size - 1) * 256);
gamma->red[i] = dmin(pow((double)i/(double)(size - 1),
output->gamma.red) * output->brightness,
1.0) * 65535.0;
if (output->gamma.green == 1.0)
gamma->green[i] = i << 8;
if (output->gamma.green == 1.0 && output->brightness == 1.0)
gamma->green[i] = (i << 8) + i;
else
gamma->green[i] = (CARD16)(pow((double)i/(double)(size - 1),
(double)output->gamma.green) * (double)(size - 1) * 256);
gamma->green[i] = dmin(pow((double)i/(double)(size - 1),
output->gamma.green) * output->brightness,
1.0) * 65535.0;
if (output->gamma.blue == 1.0)
gamma->blue[i] = i << 8;
if (output->gamma.blue == 1.0 && output->brightness == 1.0)
gamma->blue[i] = (i << 8) + i;
else
gamma->blue[i] = (CARD16)(pow((double)i/(double)(size - 1),
(double)output->gamma.blue) * (double)(size - 1) * 256);
gamma->blue[i] = dmin(pow((double)i/(double)(size - 1),
output->gamma.blue) * output->brightness,
1.0) * 65535.0;
}
XRRSetCrtcGamma(dpy, crtc->crtc.xid, gamma);
@ -1769,23 +1863,23 @@ set_positions (void)
}
switch (output->relation) {
case left_of:
case relation_left_of:
output->y = relation->y;
output->x = relation->x - mode_width (output->mode_info, output->rotation);
break;
case right_of:
case relation_right_of:
output->y = relation->y;
output->x = relation->x + mode_width (relation->mode_info, relation->rotation);
break;
case above:
case relation_above:
output->x = relation->x;
output->y = relation->y - mode_height (output->mode_info, output->rotation);
break;
case below:
case relation_below:
output->x = relation->x;
output->y = relation->y + mode_height (relation->mode_info, relation->rotation);
break;
case same_as:
case relation_same_as:
output->x = relation->x;
output->y = relation->y;
}
@ -1886,7 +1980,6 @@ set_screen_size (void)
}
}
#endif
static void
disable_outputs (output_t *outputs)
@ -2022,7 +2115,7 @@ check_strtol(char *s)
return result;
}
static int
static double
check_strtod(char *s)
{
char *endptr;
@ -2042,7 +2135,8 @@ main (int argc, char **argv)
short *rates;
Status status = RRSetConfigFailed;
int rot = -1;
int query = 0;
int query = False;
int action_requested = False;
Rotation rotation, current_rotation, rotations;
XEvent event;
XRRScreenChangeNotifyEvent *sce;
@ -2060,9 +2154,7 @@ main (int argc, char **argv)
int width = 0, height = 0;
Bool have_pixel_size = False;
int ret = 0;
#if HAS_RANDR_1_2
output_t *output = NULL;
policy_t policy = clone;
Bool setit_1_2 = False;
Bool query_1_2 = False;
Bool modeit = False;
@ -2070,10 +2162,8 @@ main (int argc, char **argv)
Bool query_1 = False;
int major, minor;
Bool current = False;
#endif
program_name = argv[0];
if (argc == 1) query = True;
for (i = 1; i < argc; i++) {
if (!strcmp ("-display", argv[i]) || !strcmp ("-d", argv[i])) {
if (++i>=argc) usage ();
@ -2082,6 +2172,7 @@ main (int argc, char **argv)
}
if (!strcmp("-help", argv[i])) {
usage();
action_requested = True;
continue;
}
if (!strcmp ("--verbose", argv[i])) {
@ -2099,8 +2190,6 @@ main (int argc, char **argv)
}
if (!strcmp("--current", argv[i])) {
current = True;
/* if --current was the only arg, then query */
if (argc == 2) query = True;
continue;
}
@ -2113,6 +2202,7 @@ main (int argc, char **argv)
if (size < 0) usage();
}
setit = True;
action_requested = True;
continue;
}
@ -2123,30 +2213,32 @@ main (int argc, char **argv)
if (++i>=argc) usage ();
rate = check_strtod(argv[i]);
setit = True;
#if HAS_RANDR_1_2
if (output)
{
output->refresh = rate;
output->changes |= changes_refresh;
setit_1_2 = True;
}
#endif
action_requested = True;
continue;
}
if (!strcmp ("-v", argv[i]) || !strcmp ("--version", argv[i])) {
version = True;
action_requested = True;
continue;
}
if (!strcmp ("-x", argv[i])) {
reflection |= RR_Reflect_X;
setit = True;
action_requested = True;
continue;
}
if (!strcmp ("-y", argv[i])) {
reflection |= RR_Reflect_Y;
setit = True;
action_requested = True;
continue;
}
if (!strcmp ("--screen", argv[i])) {
@ -2171,9 +2263,9 @@ main (int argc, char **argv)
}
rot = dirind;
setit = True;
action_requested = True;
continue;
}
#if HAS_RANDR_1_2
if (!strcmp ("--prop", argv[i]) ||
!strcmp ("--props", argv[i]) ||
!strcmp ("--madprops", argv[i]) ||
@ -2181,6 +2273,7 @@ main (int argc, char **argv)
{
query_1_2 = True;
properties = True;
action_requested = True;
continue;
}
if (!strcmp ("--output", argv[i])) {
@ -2193,6 +2286,7 @@ main (int argc, char **argv)
}
setit_1_2 = True;
action_requested = True;
continue;
}
if (!strcmp ("--crtc", argv[i])) {
@ -2253,7 +2347,7 @@ main (int argc, char **argv)
if (!strcmp ("--left-of", argv[i])) {
if (++i>=argc) usage ();
if (!output) usage();
output->relation = left_of;
output->relation = relation_left_of;
output->relative_to = argv[i];
output->changes |= changes_relation;
continue;
@ -2261,7 +2355,7 @@ main (int argc, char **argv)
if (!strcmp ("--right-of", argv[i])) {
if (++i>=argc) usage ();
if (!output) usage();
output->relation = right_of;
output->relation = relation_right_of;
output->relative_to = argv[i];
output->changes |= changes_relation;
continue;
@ -2269,7 +2363,7 @@ main (int argc, char **argv)
if (!strcmp ("--above", argv[i])) {
if (++i>=argc) usage ();
if (!output) usage();
output->relation = above;
output->relation = relation_above;
output->relative_to = argv[i];
output->changes |= changes_relation;
continue;
@ -2277,7 +2371,7 @@ main (int argc, char **argv)
if (!strcmp ("--below", argv[i])) {
if (++i>=argc) usage ();
if (!output) usage();
output->relation = below;
output->relation = relation_below;
output->relative_to = argv[i];
output->changes |= changes_relation;
continue;
@ -2285,7 +2379,7 @@ main (int argc, char **argv)
if (!strcmp ("--same-as", argv[i])) {
if (++i>=argc) usage ();
if (!output) usage();
output->relation = same_as;
output->relation = relation_same_as;
output->relative_to = argv[i];
output->changes |= changes_relation;
continue;
@ -2330,6 +2424,15 @@ main (int argc, char **argv)
setit_1_2 = True;
continue;
}
if (!strcmp ("--brightness", argv[i])) {
if (!output) usage();
if (++i>=argc) usage();
if (sscanf(argv[i], "%f", &output->brightness) != 1)
usage ();
output->changes |= changes_gamma;
setit_1_2 = True;
continue;
}
if (!strcmp ("--primary", argv[i])) {
if (!output) usage();
output->changes |= changes_primary;
@ -2360,6 +2463,7 @@ main (int argc, char **argv)
if (!strcmp ("--scale", argv[i]))
{
double sx, sy;
if (!output) usage();
if (++i>=argc) usage();
if (sscanf (argv[i], "%lfx%lf", &sx, &sy) != 2)
usage ();
@ -2379,6 +2483,7 @@ main (int argc, char **argv)
if (!strcmp ("--transform", argv[i])) {
double transform[3][3];
int k, l;
if (!output) usage();
if (++i>=argc) usage ();
init_transform (&output->transform);
if (strcmp (argv[i], "none") != 0)
@ -2414,6 +2519,7 @@ main (int argc, char **argv)
&fb_width, &fb_height) != 2)
usage ();
setit_1_2 = True;
action_requested = True;
continue;
}
if (!strcmp ("--fbmm", argv[i])) {
@ -2422,6 +2528,7 @@ main (int argc, char **argv)
&fb_width_mm, &fb_height_mm) != 2)
usage ();
setit_1_2 = True;
action_requested = True;
continue;
}
if (!strcmp ("--dpi", argv[i])) {
@ -2434,16 +2541,7 @@ main (int argc, char **argv)
dpi_output = argv[i];
}
setit_1_2 = True;
continue;
}
if (!strcmp ("--clone", argv[i])) {
policy = clone;
setit_1_2 = True;
continue;
}
if (!strcmp ("--extend", argv[i])) {
policy = extend;
setit_1_2 = True;
action_requested = True;
continue;
}
if (!strcmp ("--auto", argv[i])) {
@ -2455,6 +2553,7 @@ main (int argc, char **argv)
else
automatic = True;
setit_1_2 = True;
action_requested = True;
continue;
}
if (!strcmp ("--q12", argv[i]))
@ -2505,6 +2604,7 @@ main (int argc, char **argv)
m->action = umode_create;
umodes = m;
modeit = True;
action_requested = True;
continue;
}
if (!strcmp ("--rmmode", argv[i]))
@ -2517,6 +2617,7 @@ main (int argc, char **argv)
m->next = umodes;
umodes = m;
modeit = True;
action_requested = True;
continue;
}
if (!strcmp ("--addmode", argv[i]))
@ -2531,6 +2632,7 @@ main (int argc, char **argv)
m->next = umodes;
umodes = m;
modeit = True;
action_requested = True;
continue;
}
if (!strcmp ("--delmode", argv[i]))
@ -2545,11 +2647,13 @@ main (int argc, char **argv)
m->next = umodes;
umodes = m;
modeit = True;
action_requested = True;
continue;
}
#endif
usage();
}
if (!action_requested)
query = True;
if (verbose)
{
query = True;
@ -2575,7 +2679,6 @@ main (int argc, char **argv)
root = RootWindow (dpy, screen);
#if HAS_RANDR_1_2
if (!XRRQueryVersion (dpy, &major, &minor))
{
fprintf (stderr, "RandR extension missing\n");
@ -2910,6 +3013,11 @@ main (int argc, char **argv)
printf ("\tIdentifier: 0x%x\n", (int)output->output.xid);
printf ("\tTimestamp: %d\n", (int)output_info->timestamp);
printf ("\tSubpixel: %s\n", order[output_info->subpixel_order]);
if (output->gamma.red != 0.0 && output->gamma.green != 0.0 && output->gamma.blue != 0.0) {
printf ("\tGamma: %#.2g:%#.2g:%#.2g\n",
output->gamma.red, output->gamma.green, output->gamma.blue);
printf ("\tBrightness: %#.2g\n", output->brightness);
}
printf ("\tClones: ");
for (j = 0; j < output_info->nclone; j++)
{
@ -3127,7 +3235,6 @@ main (int argc, char **argv)
}
exit (0);
}
#endif
sc = XRRGetScreenInfo (dpy, root);

View File

@ -19,9 +19,6 @@
.\" TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
.\"
.\" $XFree86: xc/programs/xrandr/xrandr.man,v 1.6 2003/06/12 14:12:39 eich Exp $
.\"
.TH XRANDR __appmansuffix__ __vendorversion__
.SH NAME
xrandr \- primitive command line interface to RandR extension
@ -77,6 +74,7 @@ xrandr \- primitive command line interface to RandR extension
[\-\-off]
[\-\-crtc \fIcrtc\fP]
[\-\-gamma \fIred\fP:\fIgreen\fP:\fIblue\fP]
[\-\-brightness \fIbrightness\fP]
.br
.B RandR version 1.0 and version 1.1 options
@ -104,7 +102,9 @@ Print out a summary of the usage and exit.
Print out the RandR version reported by the X server and exit.
.IP \-\-verbose
Causes xrandr to be more verbose. When used with \-q (or without other
options), xrandr will display more information about the server state. When
options), xrandr will display more information about the server state. Please
note that the gamma and brightness informations are only approximations of the
complete color profile stored in the server. When
used along with options that reconfigure the system, progress will be
reported while executing the configuration changes.
.IP "\-q, \-\-query"
@ -150,22 +150,40 @@ size with \fI--fb\fP simultaneously.
.IP "\-\-transform \fIa\fP,\fIb\fP,\fIc\fP,\fId\fP,\fIe\fP,\fIf\fP,\fIg\fP,\fIh\fP,\fIi\fP"
Specifies a transformation matrix to apply on the output. Automatically a bilinear filter is selected.
The mathematical form corresponds to:
.RS
.RS
.RS
.RS
a b c
.br
d e f
.br
g h i
.RE
The transformation matrix multiplied by a coordinate vector of a pixel of the
output (extended to 3 values) gives the approximate coordinate vector of a pixel
in the graphic buffer. Typically, \fIa\fP and
The transformation is based on homogeneous coordinates. The matrix multiplied
by the coordinate vector of a pixel of the output gives the transformed
coordinate vector of a pixel in the graphic buffer. More precisely, the vector
.RI "(x y)"
of the output pixel is extended to 3 values
.RI "(x y w),"
with 1 as the w coordinate and multiplied against the matrix. The final device
coordinates of the pixel are then calculated with the so-called homogenic
division by the transformed w coordinate. In other words, the device
coordinates
.RI "(x' y')"
of the transformed pixel are:
.RS
x' = (ax + by + c) / w' and
.br
y' = (dx + ey + f) / w' ,
.br
with w' = (gx + hy + i) .
.RE
Typically, \fIa\fP and
\fIe\fP corresponds to the scaling on the X and Y axes, \fIc\fP and \fIf\fP
corresponds to the tranlastion on those axes, and \fIg\fP, \fIh\fP, and \fIi\fP
are respectively 0, 0 and 1. It also allows to express a rotation of an angle T
with:
.RS
corresponds to the translation on those axes, and \fIg\fP, \fIh\fP, and \fIi\fP
are respectively 0, 0 and 1. The matrix can also be used to express more
complex transformations such as keystone correction, or rotation. For a
rotation of an angle T, this formula can be used:
.RS
cos T -sin T 0
.br
sin T cos T 0
@ -268,8 +286,13 @@ for some reason, this option can override the normal selection.
.IP "\-\-gamma \fIred\fP:\fIgreen\fP:\fIblue\fP"
Set the specified floating point values as gamma correction on the crtc
currently attached to this output. Note that you cannot get two different values
for cloned outputs and that switching an output to another crtc doesn't change
for cloned outputs (i.e.: which share the same crtc) and that switching an output to another crtc doesn't change
the crtc gamma corrections at all.
.IP "\-\-brightness \fIbrightness\fP"
Multiply the gamma values on the crtc currently attached to the output to
specified floating value. Useful for overly bright or overly dim outputs.
However, this is a software only modification, if your hardware has support to
actually change the brightness, you will probably prefer to use \fBxbacklight\fR.
.PP
.SH "RandR version 1.1 options"
These options are available for X servers supporting RandR version 1.1 or
@ -313,8 +336,14 @@ big VGA screen display the surrounding of the mouse at normal size.
.RS
xrandr --fb 3200x2000 --output LVDS --scale 2.5x2.5 --output VGA --pos 0x0 --panning 3200x2000+0+0/3200x2000+0+0/64/64/64/64
.RE
.PP
Displays the VGA output in trapezoid shape so that it is keystone corrected
when the projector is slightly above the screen:
.RS
xrandr --fb 1024x768 --output VGA --transform 1.24,0.16,-124,0,1.24,0,0,0.000316,1
.RE
.SH "SEE ALSO"
Xrandr(3), cvt(1)
Xrandr(3), cvt(1), xkeystone(1), xbacklight(1)
.SH AUTHORS
Keith Packard,
Open Source Technology Center, Intel Corporation.