update to imake 1.0.3

This commit is contained in:
matthieu 2010-04-17 18:41:16 +00:00
parent 9ac8837d36
commit cb7715f9c1
15 changed files with 8046 additions and 4131 deletions

View File

@ -1,12 +1,48 @@
This is a stub file. This package has not yet had its complete licensing
information compiled. Please see the individual source files for details on
your rights to use and modify this software.
Copyright (c) 1985, 1986, 1987, 1989, 1993, 1994, 1996, 1998 The Open Group
Please submit updated COPYING files to the Xorg bugzilla:
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
All licensing questions regarding this software should be directed at the
Xorg mailing list:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
http://lists.freedesktop.org/mailman/listinfo/xorg
Except as contained in this notice, the name of The Open Group shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from The Open Group.
Copyright © 1999, 2000, 2003 by The XFree86 Project, Inc. All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Except as contained in this notice, the name of the XFree86 Project shall
not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from the
XFree86 Project.

View File

@ -1,67 +1,439 @@
2006-05-15 Adam Jackson <ajax@freedesktop.org>
commit 48145e04d24b1c575a22bac69c3c3033f72322fc
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Apr 15 19:52:20 2010 -0700
* configure.ac:
Bump to 1.0.2
imake 1.0.3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2006-04-08 Donnie Berkholz <spyderous@gentoo.org>
commit 6a71b39eb5a425aeee13f0e62d225dd0c6bf4e05
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Apr 15 19:38:50 2010 -0700
reviewed by: Adam Jackson
Fill in COPYING file with notices from code & man pages
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* imake.c: (get_libc_version):
Allow specifying TMPDIR environment variable to use instead of /tmp, for
systems on which /tmp is mounted noexec (Martin Schlemmer).
commit 8d8c90973f5862e8d324a4e1cd94896a43d0c27e
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Apr 15 19:22:57 2010 -0700
2005-12-20 Kevin E. Martin <kem-at-freedesktop-dot-org>
Use $(AM_V_GEN) to silence commands for generating scripts & man pages
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* configure.ac:
Update package version for X11R7 release.
commit a00cc6e7bd60eb81aeee4fa7dcbb3a07b352760d
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Apr 15 19:20:36 2010 -0700
2005-12-14 Kevin E. Martin <kem-at-freedesktop-dot-org>
Migrate to xorg-macros 1.4, with XORG_DEFAULT_OPTIONS & INSTALL
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* configure.ac:
Update package version number for final X11R7 release candidate.
commit 4e25c6af47bfac6e2b6910f5d415d788cf3398c4
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Wed Jul 8 10:25:14 2009 -0400
2005-12-11 Alan Coopersmith <alan.coopersmith@sun.com>
imake: use XORG_CHANGELOG macro to create ChangeLog. #22611
Build break: Makefile.am: command not found: git-log
Adding the macro in configure.ac and use it in Makefile.am
Refer to: https://bugs.freedesktop.org/show_bug.cgi?id=22611
Tested: running autogen.sh, make and 'make dist'
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
* Makefile.am:
Fix mkhtmlindex rules to not use $< so they work with non-GNU makes.
commit 2e164f61a461a21a74f2050f8da886373307cc5a
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Wed Jun 24 13:49:13 2009 -0700
2005-12-10 Kevin E. Martin <kem-at-freedesktop-dot-org>
Make cpp statement indenting more consistent
Auto-fixed with imdent from Paul Dubois (of imake book infamy)
Also stripped trailing whitespace to make git happier
git diff -w shows no changes in this patch other than whitespace
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
* Makefile.am:
* configure.ac:
Add support for building imake config utilities.
commit 29e3bccdb5dbc5ea45d58bd3d454a4b8cda36398
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Wed Jun 24 13:45:09 2009 -0700
2005-12-06 Kevin E. Martin <kem-at-freedesktop-dot-org>
Drop some ancient SunOS 4 & A/UX support bits
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
* Makefile.am:
Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
commit 209bab8478a5a205d715a5f2f50cd32c4b69581e
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Wed Jun 24 13:43:15 2009 -0700
2005-12-03 Kevin E. Martin <kem-at-freedesktop-dot-org>
Drop some unused #if 0 & #ifdef MONOLITH sections
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
* configure.ac:
Update package version number for X11R7 RC3 release.
commit 5667fbb0f85f2b34aaba7ea702e7d252f2d4adb6
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Mon Jun 22 18:59:09 2009 -0700
2005-11-24 Alan Coopersmith <alan.coopersmith@sun.com>
Convert HAS_MKSTEMP check from #if ...OS list... to autoconf
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
* Makefile.am:
Add makeg script & man page.
commit 22578c3718e41da72c66ce6a4186ec7315d6e3ad
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Mon Jun 22 18:26:21 2009 -0700
2005-11-12 Alan Coopersmith <alan.coopersmith@sun.com>
Only install man pages for programs/scripts being installed
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
* configure.ac:
* Makefile.am:
Substitute variables in man pages
Set CPP_PROGRAM to path to cpp
commit 705178e8f8414730739386f8841cd99f49184d56
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Mon Jun 22 18:18:50 2009 -0700
2005-11-09 Kevin E. Martin <kem-at-freedesktop-dot-org>
Add .gitignore
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
* configure.ac:
Update package version number for X11R7 RC2 release.
commit 8f0d3c8cb5e74faffbb546b0a0b47a883859fd24
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Mon Jun 22 18:15:26 2009 -0700
2005-10-16 Donnie Berkholz <spyderous@gentoo.org>
Doc updates: reflect current state, pointers to Paul Dubois website/book
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
* Makefile.am:
Bug #4725 <https://bugs.freedesktop.org/show_bug.cgi?id=4725>
Detect cf files in the correct location and mirror the monolithic
install.
commit eb8e41c3b3f280c34947579a5ee9fa511aee9acf
Merge: e215b32... 9653950...
Author: Jeremy C. Reed <reed@tx.reedmedia.net>
Date: Thu Feb 14 23:27:42 2008 -0600
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/util/imake
commit e215b32a5b46a0c49be1baa4595f258f275c3fb0
Author: Jeremy C. Reed <reed@tx.reedmedia.net>
Date: Thu Feb 14 22:41:51 2008 -0600
Stop core dump.
Don't abort() if pclose(). Because pipe may have already closed.
This is in get_stackprotector (only on OpenBSD and DragonFly).
commit 96539504eec3e6e1e43a6f894770835765b0007d
Author: Jeremy C. Reed <reed@tx.reedmedia.net>
Date: Thu Feb 14 22:41:51 2008 -0600
Stop core dump.
Don't abort() if pclose(). Because pipe may have already closed.
This is in get_stackprotector (only on OpenBSD and DragonFly).
I doubt this function even worked, because gcc -v goes to stderr so
it reads nothing.
commit 7e541aa0efe7000972d992a3c1569c4f7a8d9201
Author: James Cloos <cloos@jhcloos.com>
Date: Thu Dec 6 16:39:16 2007 -0500
Replace static ChangeLog with dist-hook to generate from git log
commit e10ad52b0a0d4fc63120e6b301d21f0829beef77
Author: Adam Jackson <ajax@nwnk.net>
Date: Fri May 19 18:44:42 2006 +0000
Bump to 1.0.2
commit ef2ef80f564098fe244c5a2065930b8502879043
Author: Donnie Berkholz <spyderous@gentoo.org>
Date: Sat Apr 8 21:43:31 2006 +0000
Allow specifying TMPDIR environment variable to use instead of /tmp, for
systems on which /tmp is mounted noexec (Martin Schlemmer).
commit b8d8f49ba2660d4d84ca9c3e4a82118a07c4e889
Author: Kevin E Martin <kem@kem.org>
Date: Wed Dec 21 02:30:08 2005 +0000
Update package version for X11R7 release.
commit 7dd15a5adbad23deba0a7c2b5bb39a7bb39e70d6
Author: Adam Jackson <ajax@nwnk.net>
Date: Mon Dec 19 16:36:01 2005 +0000
Stub COPYING files
commit bad47fc3927b766cde5af54c6c9786f2dac5345c
Author: Kevin E Martin <kem@kem.org>
Date: Thu Dec 15 00:24:40 2005 +0000
Update package version number for final X11R7 release candidate.
commit 4c12f30420340a4a4f0f6f0d21d20da988982820
Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
Date: Sun Dec 11 17:18:40 2005 +0000
Fix mkhtmlindex rules to not use $< so they work with non-GNU makes.
commit b87a680569dd388ad108d43087aee6c8a50ff663
Author: Kevin E Martin <kem@kem.org>
Date: Sat Dec 10 16:30:35 2005 +0000
Add support for building imake config utilities.
commit 15cb7c3dfb5b7d4a9e5d84514c8c5140ff6050c8
Author: Kevin E Martin <kem@kem.org>
Date: Tue Dec 6 22:48:46 2005 +0000
Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
commit bab6d99929b6dfa339993093ea7dacffc98c5acd
Author: Kevin E Martin <kem@kem.org>
Date: Sat Dec 3 05:49:47 2005 +0000
Update package version number for X11R7 RC3 release.
commit a7790a9fc6e70f5dcefbe58219b5192857c88c45
Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
Date: Mon Nov 28 22:00:24 2005 +0000
Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
commit c9db5d7eb65a59b7e4bae091acb8194bd01de284
Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
Date: Thu Nov 24 18:06:39 2005 +0000
Add makeg script & man page to imake package
commit d6313cf27320281f24d6f852fc7f8d0bb8aacd6b
Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
Date: Sat Nov 12 19:55:28 2005 +0000
Substitute variables in man pages Set CPP_PROGRAM to path to cpp
commit cd8ef36c4862f710621c35a4732ca3d0e49e8d5e
Author: Kevin E Martin <kem@kem.org>
Date: Wed Nov 9 21:25:57 2005 +0000
Update package version number for X11R7 RC2 release.
commit e53156a68f0138a8b0af408436fd54826b677cc6
Author: Kean Johnson <kean@armory.com>
Date: Tue Nov 8 06:33:24 2005 +0000
See ChangeLog entry 2005-11-07 for details.
commit 009b63897b8d2bc4fd27ff04bc3884317cf0b17d
Author: Kevin E Martin <kem@kem.org>
Date: Wed Oct 19 02:48:16 2005 +0000
Update package version number for RC1 release.
commit 19f4715eb18c20d357f03ca6b245bec5e58833e5
Author: Kevin E Martin <kem@kem.org>
Date: Sat Oct 8 20:46:40 2005 +0000
Updates for modular build
commit f4937241d85b026f0beca69eba8ce448143e3f0f
Author: Kevin E Martin <kem@kem.org>
Date: Sat Oct 8 20:38:57 2005 +0000
Build system for imake
commit 5acc1119e447c0855f649b9d8ae8ddb9cf8373b7
Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
Date: Mon Oct 3 16:17:10 2005 +0000
Bug #3812 <https://bugs.freedesktop.org/show_bug.cgi?id=3812> Patch #3462
<https://bugs.freedesktop.org/attachment.cgi?id=3462> GNU/kFreeBSD
Imake support (Robert Millan)
commit ea133dd95dbd63d5db79af1f364e9678331989e2
Author: Daniel Stone <daniel@fooishbar.org>
Date: Fri Aug 26 05:01:37 2005 +0000
Make makedepend excruciatingly safe (Debian #011).
commit 5f90561e8ddcccec3d35355c7b4ad5925031f5d5
Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
Date: Mon Aug 1 02:13:55 2005 +0000
Pass through __BUILTIN_VA_STRUCT and __BUILTIN_VA_ARG_INCR defines in
makedepend so it doesn't issue errors when source files include
<varargs.h> or <stdarg.h> on Solaris 10.
commit 65ea7b4cc68153673dcdce016acd6ee6acc4aec3
Author: Roland Mainz <roland.mainz@nrubsig.org>
Date: Wed Mar 2 11:20:29 2005 +0000
xc/config/cf/DragonFly.cf
xc/config/cf/Imake.cf
xc/config/cf/Imakefile
xc/config/imake/imake.c
xc/config/imake/imakemdep.h
xc/extras/drm/shared/drm.h
xc/include/Xos_r.h
xc/lib/xtrans/Xtranssock.c
xc/programs/Xserver/hw/xfree86/os-support/xf86_OSlib.h
xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h
xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_agp.c
//bugs.freedesktop.org/show_bug.cgi?id=1712) attachment #2004
(https://bugs.freedesktop.org/attachment.cgi?id=2004): Add support for
DragonFly/BSD platform. Patch by Jeroen Ruigrok <asmodai@tendra.org>
and Mike Verona <firedragonfly@gmail.com>.
commit ecdad73b62bb3222d02667d2add16d7417a5da9b
Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>
Date: Thu Feb 24 15:31:09 2005 +0000
enable detection of gcc compiler for cygwin and mingw
commit af6a6a1c8a30b88b2eb80aa47f58fd8ae26d9677
Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
Date: Wed Jan 19 22:28:20 2005 +0000
Pass through additional #defines for Solaris. (Sun bug id #5097074 - Alan
Coopersmith)
commit 19e94341580c4c108c8d1615ae4542e2ee27431a
Author: Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk>
Date: Sat Dec 4 00:42:46 2004 +0000
Encoding of numerous files changed to UTF-8
commit eb6967199448890591bec799d70c45827bc188eb
Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>
Date: Mon Nov 15 15:06:52 2004 +0000
Bufzilla #1802, http://freedesktop.org/bugzilla/show_bug.cgi?id=1802 Added
mingw (Win32) port
commit 36fbf892d1c2740afa51911b6f2c2e4bf8f871c0
Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
Date: Sat Oct 30 20:33:43 2004 +0000
Add -d flag for compilers like the Sun C compilers that produce dependency
lists themselves. To use with the Sun compilers, add to host.def: #
define UseCCMakeDepend YES # define DependFlags -cc $(CC) -d -xM (Sun
bug id #4245688 - fix by Alan Coopersmith)
Add Solaris to the platforms on which mprotect is run to set execute
permissions when necessary. (Sun bug id #6175128 - fix by Alan
Coopersmith)
Internationalize digital output (Sun bug id #4119396 - fix by Steve
Swales), add -bgpixmap option to set XPM file as background (originally
from STSF project version of xclock by Alan Coopersmith)
xc/programs/xmodmap/handle.c,pf.c xmodmap was printing line numbers which
are one too low in error messages (Xorg bugzilla #1739, Sun bug id
4637857 - fix by Sam Lau)
commit 02fa88c73e7df616e1c620996d613b56a119ea4d
Author: Egbert Eich <eich@suse.de>
Date: Tue Oct 19 13:50:06 2004 +0000
Enabling modules and DRI for Linux HPPA.
Removing hpsocket.c as it isn't used anywhere any more (Bugzilla #1584).
commit 8be49ad988e8072389042bb9240b074b89a828ad
Author: Egbert Eich <eich@suse.de>
Date: Mon Oct 18 14:26:35 2004 +0000
powerpc/powerpc64 build fixes.
commit 53f7aa94ebd7864b411320efe8a615580fad7085
Author: Matthieu Herrb <matthieu.herrb@laas.fr>
Date: Sat Oct 9 22:04:13 2004 +0000
Fix ProPolice support for OpenBSD (merge with the HasGccStackProtector
define that was used on OpenBSD).
remove -ansi from DefaultCCOptions on OpenBSD.
commit a60680db574e2e6c910352c4093c06dc562741ef
Author: Kevin E Martin <kem@kem.org>
Date: Wed Aug 11 21:14:02 2004 +0000
Apply PPC64 build patch (Bug #303, Mike A. Harris, Alan Coopersmith).
commit e3174f16ac5aabc0da0c22c79b138103eaba0c28
Author: Eric Anholt <anholt@freebsd.org>
Date: Fri Jun 11 17:59:30 2004 +0000
Allow overriding of os version with OSREL env var on FreeBSD. Used in the
ports cluster and cross-version testing.
commit 73f12a29fbfdac7f1cb7956f32564e253e313527
Author: Egbert Eich <eich@suse.de>
Date: Thu May 6 17:31:17 2004 +0000
BugZilla #601: Fixing makedepend choking on floating point exception
because CHAR_BIT is defined to __CHAR_BIT__ which is a compiler
intrinsic define. BugZilla #605: Fixing build on IA64 which is broken
due to the inclusion of the kernel header asm/page.h. Kernel headers
however don't work with
-ansi. The inclusion of asm/page.h can however savely be removed as it
there are plenty of other ways to determine the page size.
commit e825f4eabd82155a1327c42f16a6e3bcba96b311
Author: Egbert Eich <eich@suse.de>
Date: Fri Apr 23 18:42:00 2004 +0000
Merging XORG-CURRENT into trunk
commit fa8f86352aab5825ca289969cfd11d90e56eb579
Author: Egbert Eich <eich@suse.de>
Date: Sun Mar 14 08:27:28 2004 +0000
Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
commit 6c30fa731ba63151d792f278bf0b4dc3d2010d43
Author: Egbert Eich <eich@suse.de>
Date: Wed Mar 3 12:09:38 2004 +0000
Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
commit aa4808e4d4245d9ef0e6dae09670295da49972d0
Author: Egbert Eich <eich@suse.de>
Date: Thu Feb 26 13:34:16 2004 +0000
readding XFree86's cvs IDs
commit cb1cabdedcd488a729923ef6677b5e7b13cb3d5a
Author: Egbert Eich <eich@suse.de>
Date: Thu Feb 26 09:21:15 2004 +0000
Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
commit b1abaa61cb80aa0c282dbb15c8d834c36c2c9443
Author: Egbert Eich <eich@suse.de>
Date: Thu Jan 29 08:06:33 2004 +0000
Importing vendor version xf86-012804-2330 on Thu Jan 29 00:06:33 PST 2004
commit 91f4b859c20d25898da3324921758c2d35523fd5
Author: Kaleb Keithley <kaleb@freedesktop.org>
Date: Tue Nov 25 19:26:56 2003 +0000
XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
commit e5ab5c93d3178aa82b66e2c086b54e042930725e
Author: Kaleb Keithley <kaleb@freedesktop.org>
Date: Fri Nov 14 16:48:20 2003 +0000
XFree86 4.3.0.1
commit 1bc16368b0ff5701fa740aba943ac47a4f99b258
Author: Kaleb Keithley <kaleb@freedesktop.org>
Date: Fri Nov 14 16:48:20 2003 +0000
Initial revision
commit 86fae01174ab672736557a4bb1b2188cf3cec064
Author: Kaleb Keithley <kaleb@freedesktop.org>
Date: Fri Nov 14 15:54:29 2003 +0000
R6.6 is the Xorg base-line

291
util/imake/INSTALL Normal file
View File

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

View File

@ -31,7 +31,9 @@ endif
bin_PROGRAMS = imake $(REVPATH)
imake_CFLAGS = $(XPROTO_CFLAGS) -DCPP_PROGRAM='"$(CPP_PROGRAM)"'
AM_CFLAGS = $(CWARNFLAGS)
imake_CFLAGS = $(XPROTO_CFLAGS) -DCPP_PROGRAM='"$(CPP_PROGRAM)"' $(CWARNFLAGS)
imake_SOURCES = imake.c imakemdep.h
revpath_SOURCES = revpath.c
@ -74,13 +76,13 @@ bin_SCRIPTS = \
$(MKHTMLINDEX)
xmkmf: xmkmf.cpp
$(RAWCPP) $(RAWCPPFLAGS) -DCONFIGDIRSPEC='"-I$(XCONFDIR)"' < $(srcdir)/xmkmf.cpp | $(SED) -e /^\#/d | $(SED) -e s/XCOMM/\#/ > $@
$(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) -DCONFIGDIRSPEC='"-I$(XCONFDIR)"' < $(srcdir)/xmkmf.cpp | $(SED) -e /^\#/d | $(SED) -e s/XCOMM/\#/ > $@
ccmakedep: mdepend.cpp
$(RAWCPP) $(RAWCPPFLAGS) -DPREPROC='"$(PREPROCESSCMD_MKDEPEND)"' < $(srcdir)/mdepend.cpp | $(SED) -e /^\#/d | $(SED) -e s/XCOMM/\#/ > $@
$(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) -DPREPROC='"$(PREPROCESSCMD_MKDEPEND)"' < $(srcdir)/mdepend.cpp | $(SED) -e /^\#/d | $(SED) -e s/XCOMM/\#/ > $@
mergelib: mergelib.cpp
$(RAWCPP) $(RAWCPPFLAGS) -DARCMD="$(ARCMD)" -DRANLIB="$(RANLIB)" < $(srcdir)/mergelib.cpp | $(SED) -e /^\#/d | $(SED) -e s/XCOMM/\#/ > $@
$(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) -DARCMD="$(ARCMD)" -DRANLIB="$(RANLIB)" < $(srcdir)/mergelib.cpp | $(SED) -e /^\#/d | $(SED) -e s/XCOMM/\#/ > $@
if HAS_PERL
MKHTMLINDEX_SCRIPT = $(srcdir)/mkhtmlindex.pl
@ -89,7 +91,7 @@ MKHTMLINDEX_SCRIPT = $(srcdir)/mkhtmlindex.sh
endif
mkhtmlindex: $(MKHTMLINDEX_SCRIPT)
cp $(MKHTMLINDEX_SCRIPT) $@
$(AM_V_GEN)cp $(MKHTMLINDEX_SCRIPT) $@
CLEANFILES = \
@ -122,7 +124,9 @@ appman_PRE = \
cleanlinks.man \
mkhtmlindex.man
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
# Only need to install man pages for programs/scripts being installed
appman_needed_for = $(bin_PROGRAMS) $(bin_SCRIPTS)
appman_DATA = $(appman_needed_for:%=%.@APP_MAN_SUFFIX@)
EXTRA_DIST += $(appman_PRE)
CLEANFILES += $(appman_DATA)
@ -150,4 +154,17 @@ MAN_SUBSTS = \
SUFFIXES = .$(APP_MAN_SUFFIX) .man
.man.$(APP_MAN_SUFFIX):
sed $(MAN_SUBSTS) < $< > $@
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
EXTRA_DIST += ChangeLog
MAINTAINERCLEANFILES = ChangeLog
.PHONY: ChangeLog INSTALL
INSTALL:
$(INSTALL_CMD)
ChangeLog:
$(CHANGELOG_CMD)
dist-hook: ChangeLog INSTALL

View File

@ -62,8 +62,8 @@ host_triplet = @host@
bin_PROGRAMS = imake$(EXEEXT) $(am__EXEEXT_1)
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure COPYING ChangeLog compile config.guess \
config.sub depcomp install-sh missing
$(top_srcdir)/configure COPYING ChangeLog INSTALL compile \
config.guess config.sub depcomp install-sh missing
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
@ -123,6 +123,7 @@ 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@
ARCMD = @ARCMD@
@ -149,9 +150,11 @@ BUILD_XMKMF_TRUE = @BUILD_XMKMF_TRUE@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPP_PROGRAM = @CPP_PROGRAM@
CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@ -160,12 +163,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
HAS_PERL = @HAS_PERL@
HAS_PERL_FALSE = @HAS_PERL_FALSE@
HAS_PERL_TRUE = @HAS_PERL_TRUE@
INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@ -204,8 +210,6 @@ XCONFDIR = @XCONFDIR@
XPROTO_CFLAGS = @XPROTO_CFLAGS@
XPROTO_LIBS = @XPROTO_LIBS@
ac_ct_CC = @ac_ct_CC@
ac_ct_STRIP = @ac_ct_STRIP@
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
@ -220,29 +224,37 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
@BUILD_REVPATH_TRUE@REVPATH = revpath
imake_CFLAGS = $(XPROTO_CFLAGS) -DCPP_PROGRAM='"$(CPP_PROGRAM)"'
AM_CFLAGS = $(CWARNFLAGS)
imake_CFLAGS = $(XPROTO_CFLAGS) -DCPP_PROGRAM='"$(CPP_PROGRAM)"' $(CWARNFLAGS)
imake_SOURCES = imake.c imakemdep.h
revpath_SOURCES = revpath.c
@BUILD_MAKEG_TRUE@MAKEG = makeg
@ -265,7 +277,8 @@ bin_SCRIPTS = \
@HAS_PERL_TRUE@MKHTMLINDEX_SCRIPT = $(srcdir)/mkhtmlindex.pl
CLEANFILES = xmkmf ccmakedep mergelib mkhtmlindex $(appman_DATA)
EXTRA_DIST = makeg xmkmf.cpp mdepend.cpp mergelib.cpp mkdirhier \
cleanlinks mkhtmlindex.pl mkhtmlindex.sh $(appman_PRE)
cleanlinks mkhtmlindex.pl mkhtmlindex.sh $(appman_PRE) \
ChangeLog
# Man page
appmandir = $(APP_MAN_DIR)
@ -280,7 +293,10 @@ appman_PRE = \
cleanlinks.man \
mkhtmlindex.man
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
# Only need to install man pages for programs/scripts being installed
appman_needed_for = $(bin_PROGRAMS) $(bin_SCRIPTS)
appman_DATA = $(appman_needed_for:%=%.@APP_MAN_SUFFIX@)
# Strings to replace in man pages
XORGRELSTRING = @PACKAGE_STRING@
@ -300,6 +316,7 @@ MAN_SUBSTS = \
-e 's|__cpp__|$(RAWCPP)|g'
SUFFIXES = .$(APP_MAN_SUFFIX) .man
MAINTAINERCLEANFILES = ChangeLog
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
@ -536,6 +553,9 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
@ -665,6 +685,7 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
@ -720,8 +741,8 @@ uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \
distclean-compile distclean-generic distclean-hdr \
dist-gzip dist-hook dist-shar dist-tarZ dist-zip distcheck \
distclean distclean-compile distclean-generic distclean-hdr \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-appmanDATA install-binPROGRAMS install-binSCRIPTS \
@ -735,19 +756,29 @@ uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
xmkmf: xmkmf.cpp
$(RAWCPP) $(RAWCPPFLAGS) -DCONFIGDIRSPEC='"-I$(XCONFDIR)"' < $(srcdir)/xmkmf.cpp | $(SED) -e /^\#/d | $(SED) -e s/XCOMM/\#/ > $@
$(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) -DCONFIGDIRSPEC='"-I$(XCONFDIR)"' < $(srcdir)/xmkmf.cpp | $(SED) -e /^\#/d | $(SED) -e s/XCOMM/\#/ > $@
ccmakedep: mdepend.cpp
$(RAWCPP) $(RAWCPPFLAGS) -DPREPROC='"$(PREPROCESSCMD_MKDEPEND)"' < $(srcdir)/mdepend.cpp | $(SED) -e /^\#/d | $(SED) -e s/XCOMM/\#/ > $@
$(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) -DPREPROC='"$(PREPROCESSCMD_MKDEPEND)"' < $(srcdir)/mdepend.cpp | $(SED) -e /^\#/d | $(SED) -e s/XCOMM/\#/ > $@
mergelib: mergelib.cpp
$(RAWCPP) $(RAWCPPFLAGS) -DARCMD="$(ARCMD)" -DRANLIB="$(RANLIB)" < $(srcdir)/mergelib.cpp | $(SED) -e /^\#/d | $(SED) -e s/XCOMM/\#/ > $@
$(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) -DARCMD="$(ARCMD)" -DRANLIB="$(RANLIB)" < $(srcdir)/mergelib.cpp | $(SED) -e /^\#/d | $(SED) -e s/XCOMM/\#/ > $@
mkhtmlindex: $(MKHTMLINDEX_SCRIPT)
cp $(MKHTMLINDEX_SCRIPT) $@
$(AM_V_GEN)cp $(MKHTMLINDEX_SCRIPT) $@
.man.$(APP_MAN_SUFFIX):
sed $(MAN_SUBSTS) < $< > $@
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
.PHONY: ChangeLog INSTALL
INSTALL:
$(INSTALL_CMD)
ChangeLog:
$(CHANGELOG_CMD)
dist-hook: ChangeLog INSTALL
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -9,3 +9,38 @@ programs:
- cleanlinks
- mkhtmlindex
- xmkmf
The X Window System used imake extensively up through the X11R6.9 release,
for both full builds within the source tree and external software.
X has since moved to GNU autoconf and automake for its build system in
X11R7.0 and later releases, but still maintains imake for building existing
external software programs that have not yet converted.
More information about Imake and its usage may be found in the resources
at:
http://www.snake.net/software/imake-stuff/
http://www.kitebird.com/imake-book/
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/util/imake
http://cgit.freedesktop.org/xorg/util/imake
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

701
util/imake/aclocal.m4 vendored
View File

@ -995,33 +995,28 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
dnl
dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the
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)
# -------------------------------------
@ -1031,27 +1026,24 @@ dnl of the copyright holder.
# your configure.ac with the minimum required version, such as:
# XORG_MACROS_VERSION(1.1)
#
# To force at least a version with this macro defined, also add:
# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
# To ensure that this macro is defined, also add:
# m4_ifndef([XORG_MACROS_VERSION],
# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
#
#
# See the "minimum version" comment for each macro you use to see what
# version you require.
AC_DEFUN([XORG_MACROS_VERSION],[
[XORG_MACROS_needed_version=$1
XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
[XORG_MACROS_version=1.1.5
XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
fi
if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
fi
AC_MSG_RESULT([yes, $XORG_MACROS_version])
m4_defun([XORG_MACROS_VERSION],[
m4_define([vers_have], [1.6.1])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,,
[m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
m4_if(m4_version_compare(vers_have, [$1]), -1,
[m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
m4_undefine([vers_have])
m4_undefine([maj_have])
m4_undefine([maj_needed])
]) # XORG_MACROS_VERSION
# XORG_PROG_RAWCPP()
@ -1076,6 +1068,10 @@ else
if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
RAWCPPFLAGS=-undef
AC_MSG_RESULT([yes])
# under Cygwin unix is still defined even with -undef
elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
RAWCPPFLAGS="-undef -ansi"
AC_MSG_RESULT([yes, with -ansi])
else
AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.])
fi
@ -1188,15 +1184,21 @@ AC_SUBST([ADMIN_MAN_DIR])
# Whether or not the necessary tools and files are found can be checked
# with the AM_CONDITIONAL "BUILD_LINUXDOC"
AC_DEFUN([XORG_CHECK_LINUXDOC],[
XORG_SGML_PATH=$prefix/share/sgml
if test x$XORG_SGML_PATH = x ; then
XORG_SGML_PATH=$prefix/share/sgml
fi
HAVE_DEFS_ENT=
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
if test x"$cross_compiling" = x"yes" ; then
HAVE_DEFS_ENT=no
else
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
fi
AC_PATH_PROG(LINUXDOC, linuxdoc)
AC_PATH_PROG(PS2PDF, ps2pdf)
AC_MSG_CHECKING([Whether to build documentation])
AC_MSG_CHECKING([whether to build documentation])
if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
BUILDDOC=yes
@ -1208,7 +1210,7 @@ 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
BUILDPDFDOC=yes
@ -1240,7 +1242,9 @@ AC_SUBST(MAKE_HTML)
# indicates whether the necessary tools and files are found and, if set,
# $(MAKE_XXX) blah.sgml will produce blah.xxx.
AC_DEFUN([XORG_CHECK_DOCBOOK],[
XORG_SGML_PATH=$prefix/share/sgml
if test x$XORG_SGML_PATH = x ; then
XORG_SGML_PATH=$prefix/share/sgml
fi
HAVE_DEFS_ENT=
BUILDTXTDOC=no
BUILDPDFDOC=no
@ -1254,7 +1258,7 @@ AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
AC_PATH_PROG(DOCBOOKHTML, docbook2html)
AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
AC_MSG_CHECKING([Whether to build text documentation])
AC_MSG_CHECKING([whether to build text documentation])
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
test x$BUILD_TXTDOC != xno; then
BUILDTXTDOC=yes
@ -1262,7 +1266,7 @@ fi
AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
AC_MSG_RESULT([$BUILDTXTDOC])
AC_MSG_CHECKING([Whether to build PDF documentation])
AC_MSG_CHECKING([whether to build PDF documentation])
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
test x$BUILD_PDFDOC != xno; then
BUILDPDFDOC=yes
@ -1270,7 +1274,7 @@ fi
AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
AC_MSG_RESULT([$BUILDPDFDOC])
AC_MSG_CHECKING([Whether to build PostScript documentation])
AC_MSG_CHECKING([whether to build PostScript documentation])
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
test x$BUILD_PSDOC != xno; then
BUILDPSDOC=yes
@ -1278,7 +1282,7 @@ fi
AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
AC_MSG_RESULT([$BUILDPSDOC])
AC_MSG_CHECKING([Whether to build HTML documentation])
AC_MSG_CHECKING([whether to build HTML documentation])
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
test x$BUILD_HTMLDOC != xno; then
BUILDHTMLDOC=yes
@ -1297,6 +1301,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
@ -1306,7 +1794,7 @@ AC_SUBST(MAKE_HTML)
# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
AC_ARG_ENABLE(malloc0returnsnull,
AC_HELP_STRING([--enable-malloc0returnsnull],
AS_HELP_STRING([--enable-malloc0returnsnull],
[malloc(0) returns NULL (default: auto)]),
[MALLOC_ZERO_RETURNS_NULL=$enableval],
[MALLOC_ZERO_RETURNS_NULL=auto])
@ -1326,7 +1814,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])
@ -1358,7 +1847,7 @@ AC_SUBST([XTMALLOC_ZERO_CFLAGS])
AC_DEFUN([XORG_WITH_LINT],[
# Allow checking code with lint, sparse, etc.
AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
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
@ -1399,7 +1888,7 @@ AM_CONDITIONAL(LINT, [test x$LINT != xno])
AC_DEFUN([XORG_LINT_LIBRARY],[
AC_REQUIRE([XORG_WITH_LINT])
# Build lint "library" for more indepth checks of programs calling this library
AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
[Create lint library (default: disabled)])],
[make_lint_lib=$enableval], [make_lint_lib=no])
if test "x$make_lint_lib" != "xno" ; then
@ -1417,6 +1906,94 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
]) # XORG_LINT_LIBRARY
# XORG_CWARNFLAGS
# ---------------
# Minimum version: 1.2.0
#
# Defines CWARNFLAGS to enable C compiler warnings.
#
AC_DEFUN([XORG_CWARNFLAGS], [
AC_REQUIRE([AC_PROG_CC])
if test "x$GCC" = xyes ; then
CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
-Wbad-function-cast -Wformat=2"
case `$CC -dumpversion` in
3.4.* | 4.*)
CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
;;
esac
else
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
if test "x$SUNCC" = "xyes"; then
CWARNFLAGS="-v"
fi
fi
AC_SUBST(CWARNFLAGS)
]) # XORG_CWARNFLAGS
# XORG_STRICT_OPTION
# -----------------------
# Minimum version: 1.3.0
#
# Add configure option to enable strict compilation
AC_DEFUN([XORG_STRICT_OPTION], [
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_PROG_CC_C99])
AC_REQUIRE([XORG_CWARNFLAGS])
AC_ARG_ENABLE(strict-compilation,
AS_HELP_STRING([--enable-strict-compilation],
[Enable all warnings from compiler and make them errors (default: disabled)]),
[STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
if test "x$STRICT_COMPILE" = "xyes"; then
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
if test "x$GCC" = xyes ; then
STRICT_CFLAGS="-pedantic -Werror"
elif test "x$SUNCC" = "xyes"; then
STRICT_CFLAGS="-errwarn"
elif test "x$INTELCC" = "xyes"; then
STRICT_CFLAGS="-Werror"
fi
fi
CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
AC_SUBST([CWARNFLAGS])
]) # XORG_STRICT_OPTION
# XORG_DEFAULT_OPTIONS
# --------------------
# Minimum version: 1.3.0
#
# Defines default options for X.Org modules.
#
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
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
@ -1451,7 +2028,7 @@ dnl
AC_DEFUN([XORG_RELEASE_VERSION],[
AC_ARG_WITH(release-version,
AC_HELP_STRING([--with-release-version=STRING],
AS_HELP_STRING([--with-release-version=STRING],
[Use release version string in package name]),
[RELEASE_VERSION="$withval"],
[RELEASE_VERSION=""])
@ -1463,14 +2040,14 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
[`echo $PACKAGE_VERSION | cut -d . -f 1`],
[Major version of this package])
PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
if test "x$PVM" = "x"; then
PVM="0"
fi
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
[$PVM],
[Minor version of this package])
PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
if test "x$PVP" = "x"; then
PVP="0"
fi
@ -1479,3 +2056,19 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
[Patch version of this package])
])
# XORG_CHANGELOG()
# ----------------
# Minimum version: 1.2.0
#
# Defines the variable CHANGELOG_CMD as the command to generate
# ChangeLog from git.
#
#
AC_DEFUN([XORG_CHANGELOG], [
CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
echo 'git directory not found: installing possibly empty changelog.' >&2)"
AC_SUBST([CHANGELOG_CMD])
]) # XORG_CHANGELOG

View File

@ -1,142 +0,0 @@
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
scriptversion=2005-05-14.22
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand `-c -o'.
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file `INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
esac
ofile=
cfile=
eat=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as `compile cc -o foo foo.c'.
# So we strip `-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no `-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# `.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
# Create the lock directory.
# Note: use `[/.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@ -1,5 +1,35 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the "mkstemp" function. */
#undef HAS_MKSTEMP
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Name of package */
#undef PACKAGE
@ -27,5 +57,8 @@
/* Patch version of this package */
#undef PACKAGE_VERSION_PATCHLEVEL
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION

8232
util/imake/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -22,12 +22,18 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ([2.57])
AC_INIT(imake, [1.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
AC_INIT(imake, [1.0.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)
# 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
AC_PROG_CC
AC_PROG_INSTALL
@ -37,6 +43,9 @@ XORG_PROG_RAWCPP
CPP_PROGRAM=${RAWCPP}
AC_SUBST(CPP_PROGRAM)
AC_CHECK_FUNC([mkstemp],
AC_DEFINE(HAS_MKSTEMP,1,[Define to 1 if you have the "mkstemp" function.]))
AC_CHECK_PROG(HAS_PERL, perl, yes)
AM_CONDITIONAL([HAS_PERL], [test "x$HAS_PERL" = xyes])
@ -122,7 +131,4 @@ AM_CONDITIONAL([BUILD_MKHTMLINDEX], [test "x$BUILD_MKHTMLINDEX" = xyes])
PKG_CHECK_MODULES(XPROTO, xproto)
AC_SUBST(XPROTO_CFLAGS)
XORG_MANPAGE_SECTIONS
XORG_RELEASE_VERSION
AC_OUTPUT([Makefile])

View File

@ -145,6 +145,9 @@ in this Software without prior written authorization from The Open Group.
* #include INCLUDE_IMAKEFILE
* <add any global targets like 'clean' and long dependencies>
*/
#include "config.h"
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
/* This needs to be before _POSIX_SOURCE gets defined */
# include <sys/param.h>
@ -153,23 +156,12 @@ in this Software without prior written authorization from The Open Group.
#endif
#include <stdlib.h>
#include <stdio.h>
#ifdef MONOLITH
# include "Xosdefs.h"
#else
# include <X11/Xosdefs.h>
#endif
#include <X11/Xosdefs.h>
#include <string.h>
#include <ctype.h>
#ifdef WIN32
# include "Xw32defs.h"
#endif
#if 0
#ifndef X_NOT_POSIX
# ifndef _POSIX_SOURCE
# define _POSIX_SOURCE
# endif
#endif
#endif
#include <sys/types.h>
#include <fcntl.h>
#ifdef X_NOT_POSIX
@ -231,22 +223,16 @@ typedef union wait waitType;
# define WIFEXITED(w) waitCode(w)
# endif
#endif /* X_NOT_POSIX */
# include <stdlib.h>
#if defined(macII) && !defined(__STDC__) /* stdlib.h fails to define these */
char *malloc(), *realloc();
#endif /* macII */
#include <stdlib.h>
#include <errno.h>
#ifdef __minix_vmd
#define USE_FREOPEN 1
# define USE_FREOPEN 1
#endif
#if !((defined(sun) && !defined(SVR4)) || defined(macII))
#define USE_STRERROR 1
#endif
#ifndef WIN32
#include <sys/utsname.h>
# include <sys/utsname.h>
#else
#include <windows.h>
# include <windows.h>
#endif
#ifndef SYS_NMLN
# ifdef _SYS_NMLN
@ -256,39 +242,22 @@ char *malloc(), *realloc();
# endif
#endif
#if defined(linux) || defined(__GNU__) || defined(__GLIBC__)
#include <limits.h>
#include <stdio.h>
# include <limits.h>
# include <stdio.h>
#endif
#ifdef __QNX__
#include <unix.h>
#endif
/*
* This define of strerror is copied from (and should be identical to)
* Xos.h, which we don't want to include here for bootstrapping reasons.
*/
#ifndef USE_STRERROR
# ifndef strerror
extern char *sys_errlist[];
extern int sys_nerr;
# define strerror(n) \
(((n) >= 0 && (n) < sys_nerr) ? sys_errlist[n] : "unknown error")
# endif
# include <unix.h>
#endif
#if defined(__NetBSD__) /* see code clock in init() below */
#include <sys/utsname.h>
#endif
#if !(defined(Lynx) || defined(__Lynx__) || (defined(SVR4) && !defined(sun))) && !defined (__CYGWIN__)
#define HAS_MKSTEMP
# include <sys/utsname.h>
#endif
typedef unsigned char boolean;
#define TRUE 1
#define FALSE 0
# include "imakemdep.h"
#include "imakemdep.h"
#ifdef CROSSCOMPILE
# include "imakemdep_cpp.h"
#endif
@ -305,7 +274,7 @@ int xvariables[10];
#endif
#ifndef PATH_MAX
#define PATH_MAX 1024
# define PATH_MAX 1024
#endif
/*
@ -667,10 +636,10 @@ SetOpts(int argc, char **argv)
if (!cpp)
{
AddCppArg("-E");
#ifdef __GNUC__
# ifdef __GNUC__
if (verbose)
AddCppArg("-v");
#endif
# endif
cpp = DEFAULT_CC;
}
# else
@ -986,7 +955,7 @@ get_libc_version(FILE *inFile)
char *command;
/* If $TMPDIR is defined and has an acceptable length,
* use that as tmp dir, else use /tmp. That fixes
* use that as tmp dir, else use /tmp. That fixes
* problems with /tmp mounted "noexec".
*/
if((tmpdir = getenv("TMPDIR")) != NULL && strlen(tmpdir) < (4096-13))
@ -1042,14 +1011,14 @@ get_stackprotector(FILE *inFile)
FILE *fp;
char *cc;
char command[1024], buf[1024];
cc = getenv("CC");
if (cc == NULL) {
cc = "cc";
}
snprintf(command, sizeof(command), "%s -v 2>&1", cc);
fp = popen(command, "r");
if (fp == NULL)
if (fp == NULL)
abort();
while (fgets(buf, sizeof(buf), fp)) {
if (strstr(buf, "propolice") != NULL) {
@ -1057,11 +1026,10 @@ get_stackprotector(FILE *inFile)
break;
}
}
if (pclose(fp))
abort();
pclose(fp);
}
#endif
#if defined CROSSCOMPILE || defined linux || defined(__GLIBC__)
static void
@ -1087,14 +1055,14 @@ get_distrib(FILE *inFile)
fprintf (inFile, "%s\n", "#define LinuxWare 11");
fprintf (inFile, "%s\n", "#define LinuxYggdrasil 12");
#ifdef CROSSCOMPILE
# ifdef CROSSCOMPILE
if (CrossCompiling) {
fprintf (inFile, "%s\n",
"#define DefaultLinuxDistribution LinuxUnknown");
fprintf (inFile, "%s\n", "#define DefaultLinuxDistName Unknown");
return;
}
#endif
# endif
if (lstat (suse, &sb) == 0) {
fprintf (inFile, "%s\n", "#define DefaultLinuxDistribution LinuxSuSE");
fprintf (inFile, "%s\n", "#define DefaultLinuxDistName SuSE");
@ -1127,7 +1095,7 @@ get_ld_version(FILE *inFile)
int ldmajor, ldminor;
const char *ld = "ld -v";
#ifdef CROSSCOMPILE
# ifdef CROSSCOMPILE
if (CrossCompiling) {
char cmd[PATH_MAX];
strcpy (cmd, CrossCompileDir);
@ -1135,7 +1103,7 @@ get_ld_version(FILE *inFile)
strcat (cmd,ld);
ldprog = popen (cmd, "r");
} else
#endif
# endif
ldprog = popen (ld, "r");
if (ldprog) {
@ -1203,7 +1171,7 @@ get_binary_format(FILE *inFile)
* Returns: 0 if successful, -1 if not.
*/
static int
ask_sun_compiler_for_versions(const char *cmd, const char *path,
ask_sun_compiler_for_versions(const char *cmd, const char *path,
int *cmajor, int *cminor)
{
char buf[BUFSIZ];
@ -1212,7 +1180,7 @@ ask_sun_compiler_for_versions(const char *cmd, const char *path,
FILE* ccproc;
const char vflag[] = " -V 2>&1";
int retval = -1;
int len = strlen(cmd) + sizeof(vflag);
if (path != NULL) {
@ -1240,7 +1208,7 @@ ask_sun_compiler_for_versions(const char *cmd, const char *path,
}
}
if (retval != 0) {
fprintf(stderr,
fprintf(stderr,
"warning: could not parse version number in output of:\n"
" %s\n", cmdtorun);
}
@ -1261,20 +1229,20 @@ get_sun_compiler_versions (FILE *inFile)
struct stat sb;
/* If cross-compiling, only check CrossCompilerDir for compilers.
* If not cross-compiling, first check cc in users $PATH,
* If not cross-compiling, first check cc in users $PATH,
* then try /opt/SUNWspro if not found in the users $PATH
*/
#if defined CROSSCOMPILE
# if defined CROSSCOMPILE
if (CrossCompiling) {
if (ask_sun_compiler_for_versions("cc", CrossCompileDir,
&cmajor, &cminor) == 0) {
found = 1;
}
}
}
else
#endif
{
# endif
{
if (ask_sun_compiler_for_versions("cc", NULL, &cmajor, &cminor) == 0) {
found = 1;
} else if (ask_sun_compiler_for_versions("cc", sunpro_path,
@ -1293,22 +1261,22 @@ get_sun_compiler_versions (FILE *inFile)
/* Now do it again for C++ compiler (CC) */
found = 0;
#if defined CROSSCOMPILE
# if defined CROSSCOMPILE
if (CrossCompiling) {
if (ask_sun_compiler_for_versions("CC", CrossCompileDir,
&cmajor, &cminor) == 0) {
found = 1;
}
}
}
else
#endif
{
# endif
{
if (ask_sun_compiler_for_versions("CC", NULL, &cmajor, &cminor) == 0) {
found = 1;
} else if (ask_sun_compiler_for_versions("CC", sunpro_path,
&cmajor, &cminor) == 0) {
found = 1;
fprintf(inFile,
fprintf(inFile,
"#define DefaultSunProCplusplusCompilerDir %s", sunpro_path);
}
}
@ -1329,7 +1297,7 @@ static void
get_gcc_version(FILE *inFile, char *name)
{
fprintf (inFile, "#define HasGcc 1\n");
#ifdef CROSSCOMPILE
# ifdef CROSSCOMPILE
if (CrossCompiling)
{
if (gnu_c > 1) {
@ -1340,20 +1308,20 @@ get_gcc_version(FILE *inFile, char *name)
fprintf (inFile, "#define GccMajorVersion %d\n", gnu_c);
fprintf (inFile, "#define GccMinorVersion %d\n", gnu_c_minor);
} else
#endif
{
#if __GNUC__ > 1
fprintf (inFile, "#define HasGcc2 1\n");
# if __GNUC__ > 2
fprintf (inFile, "#define HasGcc3 1\n");
# endif
#endif
{
# if __GNUC__ > 1
fprintf (inFile, "#define HasGcc2 1\n");
# if __GNUC__ > 2
fprintf (inFile, "#define HasGcc3 1\n");
# endif
# endif
fprintf (inFile, "#define GccMajorVersion %d\n", __GNUC__);
fprintf (inFile, "#define GccMinorVersion %d\n", __GNUC_MINOR__);
}
#if defined(HAS_MERGE_CONSTANTS)
# if defined(HAS_MERGE_CONSTANTS)
fprintf (inFile, "#define HasGccMergeConstants %d\n", HAS_MERGE_CONSTANTS);
#endif
# endif
}
#endif
@ -1362,7 +1330,7 @@ get_gcc(char *cmd)
{
struct stat sb;
static char* gcc_path[] = {
# if defined(linux) || \
#if defined(linux) || \
defined(__NetBSD__) || \
defined(__OpenBSD__) || \
defined(__FreeBSD__) || \
@ -1373,7 +1341,7 @@ get_gcc(char *cmd)
defined(__GNU__) || \
defined(__GLIBC__)
"/usr/bin/cc", /* for Linux PostIncDir */
# endif
#endif
"/usr/local/bin/gcc",
"/opt/gnu/bin/gcc",
"/usr/pkg/bin/gcc"
@ -1440,13 +1408,13 @@ boolean
define_os_defaults(FILE *inFile)
{
#if defined CROSSCOMPILE || ( !defined(WIN32) && !defined(__UNIXOS2__) )
#ifdef CROSSCOMPILE
#ifdef __GNUC__
# ifdef CROSSCOMPILE
# ifdef __GNUC__
if (1)
#else
# else
if ((sys != win32) && (sys != emx))
#endif
#endif
# endif
# endif
{
# if (defined(DEFAULT_OS_NAME) || defined(DEFAULT_OS_MAJOR_REV) || \
defined(DEFAULT_OS_MINOR_REV) || defined(DEFAULT_OS_TEENY_REV))
@ -1455,16 +1423,16 @@ define_os_defaults(FILE *inFile)
char buf[SYS_NMLN * 5 + 1];
/* Obtain the system information. */
#ifdef CROSSCOMPILE
# ifdef CROSSCOMPILE
if (!CrossCompiling)
#endif
# endif
{
if (uname(&uts_name) < 0)
LogFatal("Cannot invoke uname", "");
else
name = &uts_name;
}
#if defined CROSSCOMPILE && (defined linux || defined(__GLIBC__))
# if defined CROSSCOMPILE && (defined linux || defined(__GLIBC__))
else {
strncpy(uts_name.sysname,cross_uts_sysname,SYS_NMLN);
strncpy(uts_name.release,cross_uts_release,SYS_NMLN);
@ -1472,14 +1440,14 @@ define_os_defaults(FILE *inFile)
strncpy(uts_name.machine,cross_uts_machine,SYS_NMLN);
name = &uts_name;
}
#endif
# ifdef __FreeBSD__
# endif
# ifdef __FreeBSD__
/* Override for compiling in chroot of other OS version, such as
* in the bento build cluster.
*/
{
char *e;
if ((e = getenv("OSREL")) != NULL &&
if ((e = getenv("OSREL")) != NULL &&
strlen(name->sysname) + strlen(e) + 1 < SYS_NMLN) {
strcpy(name->release, e);
strcpy(name->version, name->sysname);
@ -1487,7 +1455,7 @@ define_os_defaults(FILE *inFile)
strcat(name->version, e);
}
}
# endif
# endif
# if defined DEFAULT_OS_NAME
# if defined CROSSCOMPILE
@ -1999,10 +1967,10 @@ ReadLine(FILE *tmpfd, char *tmpfname)
fseek(tmpfd, 0, 0);
#if defined(SYSV) || defined(WIN32) || defined(USE_FREOPEN)
tmpfd = freopen(tmpfname, "w+", tmpfd);
#ifdef WIN32
# ifdef WIN32
if (! tmpfd) /* if failed try again */
tmpfd = freopen(tmpfname, "w+", fp);
#endif
# endif
if (! tmpfd)
LogFatal("cannot reopen %s\n", tmpfname);
#else /* !SYSV */
@ -2077,10 +2045,10 @@ KludgeOutputLine(char **pline)
break;
case ' ': /*May need a tab*/
default:
#ifdef CROSSCOMPILE
# ifdef CROSSCOMPILE
if (inline_syntax)
#endif
#if defined CROSSCOMPILE || defined INLINE_SYNTAX
# endif
# if defined CROSSCOMPILE || defined INLINE_SYNTAX
{
if (*p == '<' && p[1] == '<') { /* inline file close */
InInline--;
@ -2088,7 +2056,7 @@ KludgeOutputLine(char **pline)
break;
}
}
#endif
# endif
/*
* The following cases should not be treated as beginning of
* rules:
@ -2127,26 +2095,26 @@ KludgeOutputLine(char **pline)
quotechar = ']';
break;
case '=':
#ifdef CROSSCOMPILE
# ifdef CROSSCOMPILE
if (remove_cpp_leadspace)
#endif
#if defined CROSSCOMPILE || defined REMOVE_CPP_LEADSPACE
# endif
# if defined CROSSCOMPILE || defined REMOVE_CPP_LEADSPACE
{
if (!InRule && **pline == ' ') {
while (**pline == ' ')
(*pline)++;
}
}
#endif
# endif
goto breakfor;
#if defined CROSSCOMPILE || defined INLINE_SYNTAX
# if defined CROSSCOMPILE || defined INLINE_SYNTAX
case '<':
if (inline_syntax) {
if (p[1] == '<') /* inline file start */
InInline++;
}
break;
#endif
# endif
case ':':
if (p[1] == '=')
goto breakfor;

View File

@ -48,7 +48,7 @@ The following command line options may be passed to \fIimake\fP:
.TP 8
.B \-D\fIdefine\fP
This option is passed directly to \fIcpp\fP. It is typically used to set
directory-specific variables. For example, the X Window System uses this
directory-specific variables. For example, the X Window System used this
flag to set \fITOPDIR\fP to the name of the directory containing the top
of the core distribution and \fICURDIR\fP to the name of the current
directory, relative to the top.
@ -168,8 +168,13 @@ space, \fIimake\fP attempts to put back any necessary tabs (\fImake\fP is
very picky about the difference between tabs and spaces). For this reason,
colons (:) in command lines must be preceded by a backslash (\\).
.SH "USE WITH THE X WINDOW SYSTEM"
The X Window System uses \fIimake\fP extensively, for both full builds within
the source tree and external software. As mentioned above, two special
The X Window System used \fIimake\fP extensively up through the X11R6.9
release, for both full builds within the source tree and external software.
X has since moved to GNU autoconf and automake for its build system in
X11R7.0 and later releases, but still maintains imake for building existing
external software programs that have not yet converted.
.PP
As mentioned above, two special
variables, \fITOPDIR\fP and \fICURDIR,\fP are set to make referencing files
using relative path names easier. For example, the following command is
generated automatically to build the \fIMakefile\fP in the directory
@ -229,6 +234,16 @@ __cpp__ default C preprocessor
.SH "SEE ALSO"
make(1), xmkmf(1)
.br
Paul DuBois,
.I
imake-Related Software and Documentation,
http://www.snake.net/software/imake-stuff/
.br
Paul DuBois,
.I
Software Portability with imake, Second Edition,
O'Reilly & Associates, 1996.
.br
S. I. Feldman,
.I
Make \(em A Program for Maintaining Computer Programs

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
XCOMM!/bin/sh
XCOMM
XCOMM $Xorg: mdepend.cpp,v 1.3 2000/08/17 19:41:52 cpqbld Exp $
XCOMM $XdotOrg: util/imake/mdepend.cpp,v 1.4 2005/08/26 05:01:37 daniels Exp $
XCOMM $XdotOrg: $
XCOMM
XCOMM Do the equivalent of the 'makedepend' program, but do it right.
XCOMM