summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2008-04-20 13:46:03 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2008-04-20 13:46:03 +0000
commit59965ed6bc7f64f2121f10508622f5d58c8a8c1b (patch)
tree5e404d383cc335231f869d0cb12e26c59d719b47
parenta22fc870294684bbe4a11de228df75197659b51b (diff)
Update to xinit-1.0.8, while preserving local changes.
-rw-r--r--app/xinit/ChangeLog678
-rw-r--r--app/xinit/Makefile.am58
-rw-r--r--app/xinit/Makefile.in101
-rw-r--r--app/xinit/aclocal.m440
-rw-r--r--app/xinit/config.h.in6
-rw-r--r--app/xinit/configure286
-rw-r--r--app/xinit/configure.ac36
-rw-r--r--app/xinit/cpprules.in37
-rw-r--r--app/xinit/org.x.X11.plist.cpp27
-rw-r--r--app/xinit/startx.cpp188
-rw-r--r--app/xinit/xinit.c100
-rw-r--r--app/xinit/xinitrc.cpp18
12 files changed, 1328 insertions, 247 deletions
diff --git a/app/xinit/ChangeLog b/app/xinit/ChangeLog
index af1440cda..72b7fdc25 100644
--- a/app/xinit/ChangeLog
+++ b/app/xinit/ChangeLog
@@ -1,103 +1,643 @@
-2006-06-20 Matthieu Herrb <matthieu.herrb@laas.fr>
+commit 96c8650369a99e344b4e3510f713b331d83c4272
+Author: Jeremy Huddleston <jeremy@tifa.local>
+Date: Sun Mar 2 10:32:58 2008 -0800
- * xinit.c:
- Check setuid() return value. Bugzilla #7116.
+ Apple: Use -c in the launchd plist, so broken .profile/.bashrc don't much up startx
-2006-05-27 Jeremy C. Reed <reed@reedmedia.net>
+commit aa026deef43a8c1479e6a558194e0a473bbdaeb0
+Author: Jeremy Huddleston <jeremy@tifa.local>
+Date: Sat Mar 1 17:30:47 2008 -0800
- * startx.cpp:
- In comments, change contractions to be spelled out to fix
- cpp "missing terminating" errors with single quotes.
+ Apple: Adding support for an xinitrc.d directory on OSX, so fink doesn't need to clobber files
-2006-04-30 Matthieu Herrb <matthieu.herrb@laas.fr>
+commit 916b1ab10d10efbdf3a544534acb95f9d28692cf
+Author: Jeremy Huddleston <jeremy@tifa.local>
+Date: Mon Feb 18 15:53:46 2008 -0800
- * configure.ac:
- Quote MCOOKIE to allow to specify a command with args (ie
- MCOOKIE="/usr/sbin/openssl rand -hex 16" ./configure ...)
+ Apple: font caching and defaults
+ Quieted defaults "error" messages by initializing default values
+ Do font caching in startx, so users with custom ~/.xinitrc won't have to
+ worry about updating it.
+ Add "cache_fonts" defaults item to toggle whether or not to cache fonts at startup
+ Fall back on fc-cache if font_cache.sh is not present.
-2006-04-01 Adam Jackson <ajax@freedesktop.org>
+commit 19fa8408a2c707081ba984537a3dcab744b0a565
+Author: Jeremy Huddleston <jeremy@tifa-2.local>
+Date: Sat Feb 16 02:50:47 2008 -0800
- * configure.ac:
- Bump to 1.0.2.
+ Added org.x.X11.plist.cpp to EXTRA_DIST
-2006-02-25 Jeremy C. Reed <reed@reedmedia.net>
+commit 9259740a2d69c6c2fc1786508dbd08ae2cfef101
+Author: Jeremy Huddleston <jeremy@tifa.local>
+Date: Sun Feb 10 18:49:06 2008 -0800
- * startx.cpp:
- Bug #4449 <https://bugs.freedesktop.org/show_bug.cgi?id=4449>
- Be more portable (for different /bin/sh shells) for
- the arithmetic.
+ Apple: Support spaces in $HOME for font path, and remove duplicate entry
-2005-12-20 Kevin E. Martin <kem-at-freedesktop-dot-org>
+commit 4e899293d7f7bb0a67b094402fad7db55169acec
+Author: Jeremy Huddleston <jeremy@tifa.local>
+Date: Sun Feb 10 02:04:16 2008 -0800
- * configure.ac:
- Update package version for X11R7 release.
+ Apple: Cleaned up font path setting and added font caching to xinitrc
-2005-12-14 Kevin E. Martin <kem-at-freedesktop-dot-org>
+commit 238b74a47eb66bfa24627b099bf9c6a06e91d35a
+Author: Jeremy Huddleston <jeremy@tifa.local>
+Date: Sat Feb 9 22:17:02 2008 -0800
- * configure.ac:
- Update package version number for final X11R7 release candidate.
+ Apple: use -nocpp arg to xrdb if cpp is not installed
-2005-12-06 Kevin E. Martin <kem-at-freedesktop-dot-org>
+commit b9a2f211eff9f7fdc1399146d175923ca589cf2a
+Author: David Nusinow <dnusinow@debian.org>
+Date: Tue Feb 5 11:58:40 2008 -0500
- * Makefile.am:
- Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
+ Unbreak installs on non-launchd systems
+
+ Thanks to cjb for running the tinderbox that spotted this
+ breakage.
-2005-12-03 Kevin E. Martin <kem-at-freedesktop-dot-org>
+commit 6403e53a1fef9fd7dd8c77640d01bb8aaee09f91
+Author: Jeremy Huddleston <jeremy@yuffie.local>
+Date: Fri Feb 1 00:35:27 2008 -0800
- * configure.ac:
- Add m4 magic to allow AS_HELP_STRING to work with older versions
- of autoconf 2.57.
+ OS-X: Set fontpath in xinitrc to include system / user fonts. Additionally fixed font scaling issues (trac #52)
-2005-12-03 Kevin E. Martin <kem-at-freedesktop-dot-org>
+commit d9d43955a03fb3d5b2d87d9c1a7de463f1a027b6
+Author: Jeremy Huddleston <jeremy@yuffie.local>
+Date: Fri Feb 1 00:23:54 2008 -0800
- * configure.ac:
- Update package version number for X11R7 RC3 release.
+ OS-X: Fixed typo
-2005-11-14 Kevin E. Martin <kem-at-freedesktop-dot-org>
+commit 7400760ae1b88d0c514aa119643cd412a4a68b06
+Author: Jeremy Huddleston <jeremy@yuffie.local>
+Date: Wed Jan 9 21:03:41 2008 -0800
- * Makefile.am:
- * configure.ac:
- Make the programs used in the xinit scripts configurable.
+ OS-X: Add bindir to $PATH in startx if it's not there
+ This should also fix this on SCO since it was using the incorrect BINDIR
+ instead of __bindir__ in that code block...
-2005-11-09 Alan Coopersmith <alan.coopersmith@sun.com>
+commit 0f740f75ececc9742c6f407d53b482897ef5f698
+Author: Jeremy Huddleston <jeremy@yuffie.local>
+Date: Fri Jan 4 11:36:26 2008 -0800
- * configure.ac:
- Add settings for SHELL_CMD & ARCHMANDEFS to match monolith
- changes for bug #3180.
+ OS-X: Properly set enable_xauth if the user has no defaults set and choose a valid $display for fast-user-switching.
- AC_DEFINE(XORG,...) so it is listed as available server in xinit
- help output.
+commit 9c57524fde57284daae2309dce17dbf56a8643de
+Author: Jeremy Huddleston <jeremy@yuffie.local>
+Date: Thu Dec 20 18:26:38 2007 -0800
- * Makefile.am:
- Update cpp -D flags to match monolith changes for bug #3180.
-
-2005-11-09 Kevin E. Martin <kem-at-freedesktop-dot-org>
+ XQuartz doesn't need the -launchd command line argument anymore.
- * configure.ac:
- Update package version number for X11R7 RC2 release.
+commit f31042ae688d75c2043e9df56f66cabdd56fdf75
+Author: Jeremy Huddleston <jeremy@yuffie.local>
+Date: Thu Dec 20 17:22:16 2007 -0800
-2005-10-18 Kevin E. Martin <kem-at-freedesktop-dot-org>
+ OS-X: Need to use bash --login to setup the environment from launchd.
- * configure.ac:
- Update package version number for RC1 release.
+commit d1c968926fa2fe36b612d4ebc948d73e6e0f6c01
+Author: Jeremy Huddleston <jeremy@yuffie.local>
+Date: Thu Dec 20 16:50:39 2007 -0800
-2005-10-16 Alan Coopersmith <alan.coopersmith@sun.com>
+ OS-X: Made defaults test more robust
- * configure.ac:
- * Makefile.am:
- Use cpp to substitute variables in man pages
-
-2005-10-10 Alan Coopersmith <alan.coopersmith@sun.com>
+commit 73a2dd64576328de712ee792d569a88550e4ddb4
+Author: Jeremy Huddleston <jeremy@yuffie.local>
+Date: Thu Dec 20 16:13:27 2007 -0800
- * configure.ac:
- * Makefile.am:
- Don't define HAS_COOKIE_MAKER if mcookie wasn't found.
+ Added support for OS-X preferences to disable tcp/ip connections and xauth
-2005-08-29 Daniel Stone <daniel@freedesktop.org>
+commit 4afcc5afa0dc7a1d14e93f18289c4490c9f2decd
+Author: root <root@tinderbox.wearablelab.ml.unisa.edu.au>
+Date: Fri Dec 21 00:53:45 2007 +1030
- Version 0.99.1.
+ Define APPLE for the rest of us
+
+ APPLE was only defined when, well on an APPLE. However Makefile.am
+ unconditionally required it. Hence define APPLE to false when
+ we're not on an APPLE.
+
+ Found by: Tinderbox
- * configure.ac:
- * Makefile.am:
- Define HAS_COOKIE_MAKER and search for mcookie so startx will generate
- xauth tokens for the servers it starts.
+commit cced740b1e1c8220701e59cec1be04498f851296
+Author: Jeremy Huddleston <jeremy@yuffie.local>
+Date: Sun Dec 16 01:12:20 2007 -0800
+
+ OS-X: Added argv[0] hack for finding Xquartz UI and icon as well as claiming its dock icon
+ Partially removes need for x11-exec on OS-X. We still need to handle options set in defaults.
+
+commit 3c5ae3a242895f53d4f27fefb785f2725077a55d
+Author: Jeremy Huddleston <jeremy@yuffie.local>
+Date: Sat Dec 15 15:52:22 2007 -0800
+
+ Changed x11-exec to actually start X11.app. X11.app will be responsible for calling xinit.
+
+commit f5db2f6bc21b8d589b92c0f1d60bd6ec8da21ae0
+Author: Jeremy Huddleston <jeremy@yuffie.local>
+Date: Sat Dec 15 15:01:02 2007 -0800
+
+ Added Apple launchd support
+
+commit c0246278393f9440717eea292a3d31440f7972dd
+Author: James Cloos <cloos@jhcloos.com>
+Date: Thu Dec 6 15:51:07 2007 -0500
+
+ Add missing PHONY line for automatic ChangeLog generation
+
+commit 3b064b7206a84aae873743b706c41324a67c1f2c
+Author: Jeremy Huddleston <jeremy@yuffie.local>
+Date: Mon Dec 3 19:57:26 2007 -0800
+
+ Added some support for Xquartz on OS-X.
+
+commit e2963ff8acb7e20aab1f8e31a656f4553dda208a
+Merge: a7fda62... 0516336...
+Author: Matthieu Herrb <matthieu@bluenote.herrb.com>
+Date: Fri Sep 28 22:26:26 2007 +0200
+
+ Merge branch 'master' of ssh://herrb@git.freedesktop.org/git/xorg/app/xinit
+
+commit a7fda62fcb5600dc65f84148923f5a0a70181e7e
+Author: Matthieu Herrb <matthieu@bluenote.herrb.com>
+Date: Fri Sep 28 22:25:17 2007 +0200
+
+ Use /dev/arandom instead of /dev/urandom to generate the cookie
+ on OpenBSD. Problem noticed by Joerg Sonnenberger. Thanks.
+
+commit 051633650c7b7a7eb9ef494a48a6a79fa2e06080
+Author: Tilman Sauerbeck <tilman@code-monkey.de>
+Date: Mon Sep 17 12:46:59 2007 +0200
+
+ Bumped version to 1.0.7.
+
+commit 52121e9de907c61a16e41f0f08acecc1dc1546e5
+Author: Tilman Sauerbeck <tilman@code-monkey.de>
+Date: Mon Sep 17 08:27:23 2007 +0200
+
+ Bug #12448: Don't try to trap 'ERR'.
+
+ startx is advertised as a POSIX sh script. These shells don't
+ necessarily support trapping 'ERR'. This makes startx work again with
+ dash (and probably others).
+
+commit ff9752bc4304e5a29ef7e06b56bd4e0e5ca32926
+Author: Matthieu Herrb <matthieu@bluenote.herrb.com>
+Date: Sat Sep 15 18:51:19 2007 +0200
+
+ Bump to 1.0.6
+
+commit af5e859a8da23f063fd3371a9e7266054532d769
+Author: Matthieu Herrb <matthieu@bluenote.herrb.com>
+Date: Sat Sep 15 18:50:57 2007 +0200
+
+ generate
+
+commit 6c1bef8580a1dcd945c3a89522daa90fe8f4c272
+Author: Matthieu Herrb <matthieu@bluenote.herrb.com>
+Date: Sat Sep 15 18:43:52 2007 +0200
+
+ MKCOOKIE program for OpenBSD.
+
+commit b9d07ef3e07ef6f00a2f1cc730a481e5e1291f5b
+Author: Matthieu Herrb <matthieu@bluenote.herrb.com>
+Date: Sat Sep 15 18:12:52 2007 +0200
+
+ remove .serverauth.$$ file on signals or errors
+
+commit e91874313c99dfb6be042cd1739e463e080b71fc
+Author: Eric Anholt <eric@anholt.net>
+Date: Wed Sep 5 10:14:52 2007 -0700
+
+ Bump version to 1.0.5.
+
+commit 2640fb97a42e0d91603defc0f37388735c56a54d
+Author: Eric Anholt <eric@anholt.net>
+Date: Tue Sep 4 13:05:47 2007 -0700
+
+ Fix broken test for /dev/random cookie generation failure.
+
+commit fc6cc81be41af58ffd996994e1325dd072a9ab34
+Author: Eric Anholt <eric@anholt.net>
+Date: Fri Jul 13 15:34:43 2007 -0700
+
+ Use /dev/random to generate the cookie if mcookie is unavailable.
+
+ Setting XAUTHORITY without having actually generated a cookie and created
+ .Xauthority led to issues if somebody like ssh later came around and made the
+ .Xauthority file for their own setup. So, simply make it so that we never
+ fail to create one.
+
+commit e9c1d1667b58c738cb1317219cc0ac84bef2a5d6
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon May 21 20:00:38 2007 -0700
+
+ Version bump: 1.0.4
+
+commit 3686497f31ac9f548f6f3aa5d4418a96fe564497
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon May 21 18:42:56 2007 -0700
+
+ Remove old Imake checks now that we always build with autoconf
+
+commit d5b726c2dbc22b6fd9623604e9252aaef30c387c
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon May 21 18:18:56 2007 -0700
+
+ Remove support for pre-POSIX-1990 platforms
+
+commit dfba9a82068b44429a08b307d26b91495c10c7c1
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon May 21 17:52:38 2007 -0700
+
+ Modernize list of Xservers printed when "X" is not found in $PATH
+
+commit a73284c7aeeab7ee0c1b6027819955ef7b08f23d
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon May 21 17:09:40 2007 -0700
+
+ Replace static ChangeLog with dist hook to generate from git log
+
+commit 8942f1fd8377c0e67e5ad493af55b7d7b3f996c7
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon May 21 16:49:18 2007 -0700
+
+ Don't print windowpath debug messages unless built -DDEBUG
+
+ No need to print warnings on systems without vt support
+
+commit fa78528b44d4c1c50594359e17114208834a84fd
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Fri Aug 25 16:48:00 2006 -0800
+
+ X.Org Bugzilla #8013: xinit should set WINDOWPATH
+
+ X.Org Bugzilla #8013: <https://bugs.freedesktop.org/show_bug.cgi?id=8013>
+ Patch #6701: <https://bugs.freedesktop.org/attachment.cgi?id=6701>
+
+commit 64f1a94404924b1ada6b43ed33c80a560712ec36
+Author: Daniel Drake <ddrake@brontes3d.com>
+Date: Mon May 21 16:33:23 2007 -0700
+
+ Fill in COPYING File (X.Org Bugzilla #11024)
+
+commit 3b6dad2ba4d4507cd742d8e7ff760fe006c0aa23
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Fri May 18 23:44:06 2007 -0700
+
+ Bug #10616: Clarify syntax on xinit & startx man pages
+
+ X.Org Bugzilla #10616: <https://bugs.freedesktop.org/show_bug.cgi?id=10616>
+ Reported upstream from
+ Debian bug #267744 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=267744>
+
+commit ad23a55a581ab18c4614e2cb5d82c4376ee88722
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon Nov 6 14:56:07 2006 -0800
+
+ Stop hardcoding /usr/X11R6/bin in manpage examples
+
+commit c50afd78af7496938a10b317c5e41b4d99d1fc60
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon Nov 6 14:47:34 2006 -0800
+
+ Change example X server argument from bc to -br now that bc is gone
+
+commit 7b3e51364355716731670522b578b23d40fb356b
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon Nov 6 14:46:42 2006 -0800
+
+ Add *~ to .gitignore to skip over emacs/patch droppings
+
+commit c9da362e9f3f80a91b91011c21ef85e1cd3ef48b
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date: Mon Nov 6 14:46:15 2006 -0800
+
+ renamed: .cvsignore -> .gitignore
+
+commit de19be83afe7d0dc9a71fa529e80d91b4e26bdda
+Author: Adam Jackson <ajax@benzedrine.nwnk.net>
+Date: Fri Oct 13 17:53:12 2006 -0400
+
+ Bump to 1.0.3
+
+commit 4fc9d215202b494a9182913f84eb41ba2bd1e39b
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date: Tue Jun 20 19:25:51 2006 +0000
+
+ Check setuid() return value. Bugzilla #7116.
+
+commit 732e5f17cf5189854654360e978a62d6d6b82d4b
+Author: Jeremy C. Reed <reed@reedmedia.net>
+Date: Sat May 27 15:28:04 2006 +0000
+
+ In comments, change contractions to be spelled out to fix cpp "missing
+ terminating" errors with single quotes.
+
+commit db74ad799da27eec04b5aed64e3564aef9156a04
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date: Sun Apr 30 14:19:19 2006 +0000
+
+ Quote MCOOKIE to allow to specify a command with args (ie
+ MCOOKIE="/usr/sbin/openssl rand -hex 16" ./configure ...)
+
+commit 797f51d176ab9a29497a9141a57a968c5a7d3792
+Author: Adam Jackson <ajax@nwnk.net>
+Date: Sun Apr 2 01:06:41 2006 +0000
+
+ Bump to 1.0.2.
+
+commit bbf54921031f679c0d266a6b2ef4926f872d18f1
+Author: Jeremy C. Reed <reed@reedmedia.net>
+Date: Sat Feb 25 15:20:06 2006 +0000
+
+ Bug #4449 <https://bugs.freedesktop.org/show_bug.cgi?id=4449> Be more
+ portable (for different /bin/sh shells) for the arithmetic.
+ NetBSD's /bin/sh didn't like: dummy=$((dummy+1)) and complained: startx:
+ arith: syntax error: "dummy+1"
+ This was fixed by NetBSD and also by Gentoo, see:
+ https://launchpad.net/distros/ubuntu/+source/xinit/+bug/31241
+
+commit 6690352bdd01603a5e82e177aab4804d5424b8b1
+Author: Kevin E Martin <kem@kem.org>
+Date: Wed Dec 21 02:29:51 2005 +0000
+
+ Update package version for X11R7 release.
+
+commit 9ea919f305201ad9c3695a4534f08d5d373d3eb5
+Author: Adam Jackson <ajax@nwnk.net>
+Date: Mon Dec 19 16:22:44 2005 +0000
+
+ Stub COPYING files
+
+commit 0a95c12d2dd1da5a2c2f7ef3a731ef40074fba23
+Author: Kevin E Martin <kem@kem.org>
+Date: Thu Dec 15 00:24:07 2005 +0000
+
+ Update package version number for final X11R7 release candidate.
+
+commit 18056e663f89b0b5019f549365afbdf975a59d61
+Author: Kevin E Martin <kem@kem.org>
+Date: Tue Dec 6 22:48:22 2005 +0000
+
+ Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
+
+commit cc7dfc25d5854ac08dfa7dc52c96702e60777e5c
+Author: Kevin E Martin <kem@kem.org>
+Date: Sat Dec 3 17:08:50 2005 +0000
+
+ Add m4 magic to allow AS_HELP_STRING to work with older versions of
+ autoconf 2.57.
+
+commit b0081f30f7d2bdc59509e09b7d147700456d562e
+Author: Kevin E Martin <kem@kem.org>
+Date: Sat Dec 3 05:49:24 2005 +0000
+
+ Update package version number for X11R7 RC3 release.
+
+commit 15470956794d19c3b1ee0d17e727e0a77436518f
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Mon Nov 28 22:01:43 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 66b04609fdf1910588e05f74f772441c712ed0cc
+Author: Eric Anholt <anholt@freebsd.org>
+Date: Mon Nov 21 10:35:01 2005 +0000
+
+ Another pass at .cvsignores for apps.
+
+commit d286ee2400f8f9c4110971545ef50a556e5c08f9
+Author: Eric Anholt <anholt@freebsd.org>
+Date: Sun Nov 20 22:08:53 2005 +0000
+
+ Add/improve .cvsignore files for apps.
+
+commit 0a06386696875638e9e9b6e47e95affbf542e25d
+Author: Kevin E Martin <kem@kem.org>
+Date: Tue Nov 15 04:05:59 2005 +0000
+
+ Make the programs used in the xinit scripts configurable.
+
+commit 549c55ea15e60b9aca5da1ed6f18564f1e69cd26
+Author: Kevin E Martin <kem@kem.org>
+Date: Tue Nov 15 04:03:10 2005 +0000
+
+ Make using full paths in the xinit scripts optional.
+
+commit 277975ec73744657e556a0c6380614d8684db7df
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Thu Nov 10 04:25:39 2005 +0000
+
+ Add settings for SHELL_CMD & ARCHMANDEFS to match monolith changes for bug
+ #3180.
+ AC_DEFINE(XORG,...) so it is listed as available server in xinit help
+ output.
+ Update cpp -D flags to match monolith changes for bug #3180.
+
+commit 6e7bcf4f2ea8bb868ed8b0459f1c0d6cc172f4ae
+Author: Kevin E Martin <kem@kem.org>
+Date: Wed Nov 9 21:09:21 2005 +0000
+
+ Update package version number for X11R7 RC2 release.
+
+commit af47a9e0dd891dcaa52b12f4eda85381e0467916
+Author: Kean Johnson <kean@armory.com>
+Date: Tue Nov 8 06:33:33 2005 +0000
+
+ See ChangeLog entry 2005-11-07 for details.
+
+commit 6beb2e4769b8b3708f30ee7adf8037a4e1f39f3d
+Author: Kevin E Martin <kem@kem.org>
+Date: Wed Oct 19 02:47:54 2005 +0000
+
+ Update package version number for RC1 release.
+
+commit dc0b907e02d6c1ab917e30c4b262b5c9f780ef12
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Mon Oct 17 23:56:23 2005 +0000
+
+ Use @APP_MAN_SUFFIX@ instead of $(APP_MAN_SUFFIX) in macro substitutions to
+ work better with BSD make
+
+commit 0c48fdb05b2538c94c809e25c8690a7094900e07
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Sun Oct 16 22:18:22 2005 +0000
+
+ Use cpp to substitute variables in man pages
+
+commit 9c8787d2ce69e55b9ba362a92f01592d8ee0a3a3
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Tue Oct 11 01:09:43 2005 +0000
+
+ Don't define HAS_COOKIE_MAKER if mcookie wasn't found.
+
+commit e2dd25d3cf2f10c0cff0d37d05f58b81344db68b
+Author: Adam Jackson <ajax@nwnk.net>
+Date: Tue Oct 4 01:27:34 2005 +0000
+
+ Bug #2027: Treat SIGTERM like SIGINT in xinit. (Andreas Luik)
+
+commit 48ea043e65943fd66e03788be9867c69b96c738c
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Mon Aug 29 01:56:12 2005 +0000
+
+ Bump to 0.99.1.
+
+commit 9f74cfed8f808009b3acfa0af383218f3bf0fc00
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Mon Aug 29 01:54:30 2005 +0000
+
+ Define HAS_COOKIE_MAKER and search for mcookie so startx will generate
+ xauth tokens for the servers it starts.
+
+commit 52fb36b1ec52e78916bf9cf1a5e7bdce05482b0c
+Author: Eric Anholt <anholt@freebsd.org>
+Date: Thu Aug 11 18:11:32 2005 +0000
+
+ Bugzilla #4045: Do a missed replacement of @@ with \ in startx.
+ Submitted by: David Schleef <ds@schleef.org>
+
+commit ef53714d87aa71309fe2f22862f1892a8e620336
+Author: Eric Anholt <anholt@freebsd.org>
+Date: Thu Aug 11 18:09:45 2005 +0000
+
+ Set CSRG_BASED for BSD systems so the build succeeds.
+
+commit 2b515c0e9940d3fc5b4151d10678f3c0b09668fc
+Author: Kevin E Martin <kem@kem.org>
+Date: Fri Jul 29 21:22:34 2005 +0000
+
+ Various changes preparing packages for RC0:
+ - Verify and update package version numbers as needed
+ - Implement versioning scheme
+ - Change bug address to point to bugzilla bug entry form
+ - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
+ reenable it)
+ - Fix makedepend to use pkgconfig and pass distcheck
+ - Update build script to build macros first
+ - Update modular Xorg version
+
+commit 22c07dc931424a64046c489ff95b9ca14d7a5552
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Tue Jul 26 18:58:15 2005 +0000
+
+ Use AC_TYPE_SIGNAL and AC_FUNC_VFORK to replace Imake's SIGNAL_DEFINES and
+ -DHAS_VFORK
+
+commit db7faf36b93971eef4857d24efe0de155b7cdb19
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Tue Jul 26 18:55:42 2005 +0000
+
+ Add config.h includes for modularization Use RETSIGTYPE if defined by
+ autoconf in addition to Imake's SIGNALRETURNSINT. Use
+ HAVE_WORKING_VFORK if defined by autoconf in addition to Imake's
+ HAS_VFORK
+
+commit e5280bb6562129bf7617a24784b19da4cbd7abc8
+Author: Adam Jackson <ajax@nwnk.net>
+Date: Mon Jul 25 23:19:06 2005 +0000
+
+ Bug #3860: Avoid a bashism. (Diego Pettenò)
+
+commit 4c76716e9eef58c7de7dab27bdeca33a2980b726
+Author: Daniel Stone <daniel@fooishbar.org>
+Date: Sat Jul 23 03:02:58 2005 +0000
+
+ Move manpages to section 1.
+
+commit b5a90f98073bfa5d5615f5aa0ae73af07f625bbb
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Wed Jul 20 22:49:25 2005 +0000
+
+ Use kbd_mode -a to restore console keyboard on Solaris x86 too.
+
+commit e83a8d3f9816605106a496c89f9e9ccfae3e4f4c
+Author: Adam Jackson <ajax@nwnk.net>
+Date: Wed Jul 20 19:31:57 2005 +0000
+
+ Use a unique token for PKG_CHECK_MODULES. Otherwise, if you use a global
+ configure cache, you cache it, and the cached value is probably wrong.
+
+commit d8980cb7b6df64cf92c5b660f838497296dbb0bb
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date: Sat Jul 16 23:29:38 2005 +0000
+
+ x11perf/Makefile.am: xinit/Makefile.am: xvidtune/Makefile.am:
+ - Replace $< with portable macro xinit/Makefile.am: xinit/configure.ac:
+ xvidtune/Makefile.am: xvidtune/configure.ac:
+ - Use more portable cpp invocations for pre-processing files
+ xfs/configure.ac:
+ - Add XTRANS_CONNECTION_FLAGS so xtrans transport type defines are set
+ correctly
+
+commit d731a249d0c1c7f9eb77828c0d6e79cfdaf75589
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date: Tue Jul 5 21:12:01 2005 +0000
+
+ Build system for xinit
+
+commit dd7fee44b126636d6c3edd9e325ce411e3ae5d78
+Author: Egbert Eich <eich@suse.de>
+Date: Wed Apr 20 17:54:12 2005 +0000
+
+ Separate server auth and client .Xautority file in startx. .Xautority might
+ have credentials from other Xservers which we might not want to enable
+ on ours Bugzilla #3078).
+
+commit 4118bc8579ac75620ea6cda2b16d3ebbe4f5b6af
+Author: Egbert Eich <eich@suse.de>
+Date: Fri Apr 23 19:54:49 2004 +0000
+
+ Merging XORG-CURRENT into trunk
+
+commit 52279458e75907cb4d004e8be0c87f1c7b714159
+Author: Egbert Eich <eich@suse.de>
+Date: Sun Mar 14 08:35:24 2004 +0000
+
+ Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
+
+commit 59c01948e5bda5b2584e1a19f735737896a87c69
+Author: Egbert Eich <eich@suse.de>
+Date: Wed Mar 3 12:13:08 2004 +0000
+
+ Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
+
+commit 6427c13f6e132a3d19bbb7c3a2dc0c5b8215b3d8
+Author: Egbert Eich <eich@suse.de>
+Date: Thu Feb 26 13:36:25 2004 +0000
+
+ readding XFree86's cvs IDs
+
+commit 40ac2d222287210c7724e3ac5a15af490aed50b9
+Author: Egbert Eich <eich@suse.de>
+Date: Thu Feb 26 09:24:08 2004 +0000
+
+ Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
+
+commit fae621e34ee1eff0bc70e60c7843c0fce9f9ec1a
+Author: Egbert Eich <eich@suse.de>
+Date: Thu Jan 29 08:09:12 2004 +0000
+
+ Importing vendor version xf86-012804-2330 on Thu Jan 29 00:06:33 PST 2004
+
+commit b1dacbed577312f5fa86d9d81aa946276c646167
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Tue Nov 25 19:29:13 2003 +0000
+
+ XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
+
+commit c301daadb9de3348d7dd1b511cadf7d55a59bc1c
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Fri Nov 14 16:49:22 2003 +0000
+
+ XFree86 4.3.0.1
+
+commit b7d9a0b434bb0d32857fc47611926cb59ac7f3c5
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Fri Nov 14 16:49:22 2003 +0000
+
+ Initial revision
+
+commit f18e25ab379836d0885660ad9c42ed588b1152b8
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date: Fri Nov 14 15:54:54 2003 +0000
+
+ R6.6 is the Xorg base-line
diff --git a/app/xinit/Makefile.am b/app/xinit/Makefile.am
index a6ad04aa9..171e31b7c 100644
--- a/app/xinit/Makefile.am
+++ b/app/xinit/Makefile.am
@@ -27,6 +27,10 @@ bin_SCRIPTS = startx
xinit_CFLAGS = $(XINIT_CFLAGS) -DXINITDIR=\"$(XINITDIR)\" -DBINDIR=\"$(bindir)\"
xinit_LDADD = $(XINIT_LIBS)
+if APPLE
+xinit_LDFLAGS = -framework CoreServices
+endif
+
xinit_SOURCES = \
xinit.c
@@ -38,39 +42,7 @@ appman_PRE = \
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
-# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM
-# to cpp, because that trick does not work on all ANSI C preprocessors.
-# Delete line numbers from the cpp output (-P is not portable, I guess).
-# Allow XCOMM to be preceded by whitespace and provide a means of generating
-# output lines with trailing backslashes.
-# Allow XHASH to always be substituted, even in cases where XCOMM isn't.
-
-CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \
- -e '/^\#line *[0-9][0-9]* *.*$$/d' \
- -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \
- -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \
- -e '/^[ ]*XHASH/s/XHASH/\#/' \
- -e '/\@\@$$/s/\@\@$$/\\/'
-
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
- XORGMANNAME = X Version 11
-
-MANDEFS = \
- -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \
- -D__appmansuffix__=$(APP_MAN_SUFFIX) \
- -D__filemansuffix__=$(FILE_MAN_SUFFIX) \
- -D__libmansuffix__=$(LIB_MAN_SUFFIX) \
- -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \
- -D__XSERVERNAME__=Xorg -D__XCONFIGFILE__=xorg.conf \
- -D__xinitdir__=$(XINITDIR) \
- -D__bindir__=$(bindir) \
- -DSHELL_CMD=$(SHELL_CMD) $(ARCHMANDEFS)
-
-SUFFIXES = .$(APP_MAN_SUFFIX) .man
-
-.man.$(APP_MAN_SUFFIX):
- $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@
+include $(top_srcdir)/cpprules.in
xinitrcdir = $(XINITDIR)
@@ -86,23 +58,29 @@ PROGCPPDEFS = \
-DWM=@WM@ \
-DXCONSOLE=@XCONSOLE@
-SCRIPTDEFS = \
+CPP_FILES_FLAGS = \
-DXINITDIR=$(XINITDIR) $(PROGCPPDEFS) -DLIBDIR=$(libdir) \
- -DSHELL_CMD=$(SHELL_CMD) $(STARTX_COOKIE_FLAGS)
+ -DSHELL_CMD=$(SHELL_CMD) $(STARTX_COOKIE_FLAGS) \
+ -D__libexecdir__="$(libexecdir)" \
+ -D__bindir__="$(bindir)"
-xinitrc: xinitrc.cpp
- $(RAWCPP) $(SCRIPTDEFS) < $(srcdir)/xinitrc.cpp | $(CPP_SED_MAGIC) > $@
+if LAUNCHD
+launchagents_PRE = org.x.X11.plist.pre
+launchagents_DATA = $(launchagents_PRE:plist.pre=plist)
+endif
+xinitrc: xinitrc.cpp Makefile
startx: startx.cpp Makefile
- $(RAWCPP) $(SCRIPTDEFS) < $(srcdir)/startx.cpp | $(CPP_SED_MAGIC) > $@
xinitrc_DATA = xinitrc
-CLEANFILES = xinitrc startx $(appman_DATA)
+CLEANFILES = xinitrc startx $(appman_DATA) $(launchagents_DATA)
-EXTRA_DIST = xinitrc.cpp startx.cpp $(appman_PRE) \
+EXTRA_DIST = xinitrc.cpp startx.cpp org.x.X11.plist.cpp $(appman_PRE) \
startx.cmd xinitrc.cmd xinit.def ChangeLog autogen.sh
+.PHONY: ChangeLog
+
ChangeLog:
(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
diff --git a/app/xinit/Makefile.in b/app/xinit/Makefile.in
index 790b497f1..4e3de3b85 100644
--- a/app/xinit/Makefile.in
+++ b/app/xinit/Makefile.in
@@ -35,6 +35,13 @@
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
+# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM
+# to cpp, because that trick does not work on all ANSI C preprocessors.
+# Delete line numbers from the cpp output (-P is not portable, I guess).
+# Allow XCOMM to be preceded by whitespace and provide a means of generating
+# output lines with trailing backslashes.
+# Allow XHASH to always be substituted, even in cases where XCOMM isn't.
+
srcdir = @srcdir@
@@ -62,8 +69,9 @@ host_triplet = @host@
bin_PROGRAMS = xinit$(EXEEXT)
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
- $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
- compile config.guess config.sub depcomp install-sh missing
+ $(top_srcdir)/configure $(top_srcdir)/cpprules.in AUTHORS \
+ COPYING ChangeLog INSTALL NEWS compile config.guess config.sub \
+ depcomp install-sh missing
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
@@ -75,7 +83,8 @@ mkinstalldirs = $(SHELL) $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \
- "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(xinitrcdir)"
+ "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(launchagentsdir)" \
+ "$(DESTDIR)$(xinitrcdir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
am_xinit_OBJECTS = xinit-xinit.$(OBJEXT)
@@ -100,8 +109,9 @@ am__vpath_adj = case $$p in \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
appmanDATA_INSTALL = $(INSTALL_DATA)
+launchagentsDATA_INSTALL = $(INSTALL_DATA)
xinitrcDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(appman_DATA) $(xinitrc_DATA)
+DATA = $(appman_DATA) $(launchagents_DATA) $(xinitrc_DATA)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -121,6 +131,8 @@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+APPLE_FALSE = @APPLE_FALSE@
+APPLE_TRUE = @APPLE_TRUE@
APP_MAN_DIR = @APP_MAN_DIR@
APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
ARCHMANDEFS = @ARCHMANDEFS@
@@ -149,6 +161,9 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LAUNCHD = @LAUNCHD@
+LAUNCHD_FALSE = @LAUNCHD_FALSE@
+LAUNCHD_TRUE = @LAUNCHD_TRUE@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -218,6 +233,7 @@ host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
+launchagentsdir = @launchagentsdir@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
@@ -234,6 +250,7 @@ XINITDIR = $(datadir)/X11/xinit
bin_SCRIPTS = startx
xinit_CFLAGS = $(XINIT_CFLAGS) -DXINITDIR=\"$(XINITDIR)\" -DBINDIR=\"$(bindir)\"
xinit_LDADD = $(XINIT_LIBS)
+@APPLE_TRUE@xinit_LDFLAGS = -framework CoreServices
xinit_SOURCES = \
xinit.c
@@ -243,18 +260,12 @@ appman_PRE = \
xinit.man
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
-
-# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM
-# to cpp, because that trick does not work on all ANSI C preprocessors.
-# Delete line numbers from the cpp output (-P is not portable, I guess).
-# Allow XCOMM to be preceded by whitespace and provide a means of generating
-# output lines with trailing backslashes.
-# Allow XHASH to always be substituted, even in cases where XCOMM isn't.
CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \
-e '/^\#line *[0-9][0-9]* *.*$$/d' \
-e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \
-e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \
-e '/^[ ]*XHASH/s/XHASH/\#/' \
+ -e '/XSLASHGLOB/s/XSLASHGLOB/\/\*/' \
-e '/\@\@$$/s/\@\@$$/\\/'
@@ -272,7 +283,7 @@ MANDEFS = \
-D__bindir__=$(bindir) \
-DSHELL_CMD=$(SHELL_CMD) $(ARCHMANDEFS)
-SUFFIXES = .$(APP_MAN_SUFFIX) .man
+SUFFIXES = .$(APP_MAN_SUFFIX) .man .cpp
xinitrcdir = $(XINITDIR)
PROGCPPDEFS = \
-DXRDB=@XRDB@ \
@@ -286,23 +297,27 @@ PROGCPPDEFS = \
-DWM=@WM@ \
-DXCONSOLE=@XCONSOLE@
-SCRIPTDEFS = \
+CPP_FILES_FLAGS = \
-DXINITDIR=$(XINITDIR) $(PROGCPPDEFS) -DLIBDIR=$(libdir) \
- -DSHELL_CMD=$(SHELL_CMD) $(STARTX_COOKIE_FLAGS)
+ -DSHELL_CMD=$(SHELL_CMD) $(STARTX_COOKIE_FLAGS) \
+ -D__libexecdir__="$(libexecdir)" \
+ -D__bindir__="$(bindir)"
+@LAUNCHD_TRUE@launchagents_PRE = org.x.X11.plist.pre
+@LAUNCHD_TRUE@launchagents_DATA = $(launchagents_PRE:plist.pre=plist)
xinitrc_DATA = xinitrc
-CLEANFILES = xinitrc startx $(appman_DATA)
-EXTRA_DIST = xinitrc.cpp startx.cpp $(appman_PRE) \
+CLEANFILES = xinitrc startx $(appman_DATA) $(launchagents_DATA)
+EXTRA_DIST = xinitrc.cpp startx.cpp org.x.X11.plist.cpp $(appman_PRE) \
startx.cmd xinitrc.cmd xinit.def ChangeLog autogen.sh
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
-.SUFFIXES: .$(APP_MAN_SUFFIX) .man .c .o .obj
+.SUFFIXES: .$(APP_MAN_SUFFIX) .man .cpp .c .o .obj
am--refresh:
@:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/cpprules.in $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -449,6 +464,23 @@ uninstall-appmanDATA:
echo " rm -f '$(DESTDIR)$(appmandir)/$$f'"; \
rm -f "$(DESTDIR)$(appmandir)/$$f"; \
done
+install-launchagentsDATA: $(launchagents_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(launchagentsdir)" || $(mkdir_p) "$(DESTDIR)$(launchagentsdir)"
+ @list='$(launchagents_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(launchagentsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(launchagentsdir)/$$f'"; \
+ $(launchagentsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(launchagentsdir)/$$f"; \
+ done
+
+uninstall-launchagentsDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(launchagents_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(launchagentsdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(launchagentsdir)/$$f"; \
+ done
install-xinitrcDATA: $(xinitrc_DATA)
@$(NORMAL_INSTALL)
test -z "$(xinitrcdir)" || $(mkdir_p) "$(DESTDIR)$(xinitrcdir)"
@@ -648,7 +680,7 @@ check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) config.h
installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(xinitrcdir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(launchagentsdir)" "$(DESTDIR)$(xinitrcdir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
@@ -697,7 +729,8 @@ info: info-am
info-am:
-install-data-am: install-appmanDATA install-xinitrcDATA
+install-data-am: install-appmanDATA install-launchagentsDATA \
+ install-xinitrcDATA
install-exec-am: install-binPROGRAMS install-binSCRIPTS
@@ -727,7 +760,8 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
- uninstall-binSCRIPTS uninstall-info-am uninstall-xinitrcDATA
+ uninstall-binSCRIPTS uninstall-info-am \
+ uninstall-launchagentsDATA uninstall-xinitrcDATA
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
@@ -737,23 +771,26 @@ uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
dvi-am html html-am info info-am install install-am \
install-appmanDATA install-binPROGRAMS install-binSCRIPTS \
install-data install-data-am install-exec install-exec-am \
- install-info install-info-am install-man install-strip \
- install-xinitrcDATA installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-appmanDATA \
- uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-info-am \
- uninstall-xinitrcDATA
+ install-info install-info-am install-launchagentsDATA \
+ install-man install-strip install-xinitrcDATA installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-appmanDATA uninstall-binPROGRAMS \
+ uninstall-binSCRIPTS uninstall-info-am \
+ uninstall-launchagentsDATA uninstall-xinitrcDATA
+.cpp:
+ $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@
+
.man.$(APP_MAN_SUFFIX):
$(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@
-xinitrc: xinitrc.cpp
- $(RAWCPP) $(SCRIPTDEFS) < $(srcdir)/xinitrc.cpp | $(CPP_SED_MAGIC) > $@
-
+xinitrc: xinitrc.cpp Makefile
startx: startx.cpp Makefile
- $(RAWCPP) $(SCRIPTDEFS) < $(srcdir)/startx.cpp | $(CPP_SED_MAGIC) > $@
+
+.PHONY: ChangeLog
ChangeLog:
(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
diff --git a/app/xinit/aclocal.m4 b/app/xinit/aclocal.m4
index 5419cfb3c..e7bd1a8cd 100644
--- a/app/xinit/aclocal.m4
+++ b/app/xinit/aclocal.m4
@@ -740,6 +740,34 @@ AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
+# Copyright (C) 1999, 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# AM_PROG_CC_C_O
+# --------------
+# Like AC_PROG_CC_C_O, but changed for automake.
+AC_DEFUN([AM_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+])
+
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
@@ -1042,7 +1070,7 @@ AC_DEFUN([XORG_MACROS_VERSION],[
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_version=1.1.6
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
@@ -1191,7 +1219,11 @@ AC_DEFUN([XORG_CHECK_LINUXDOC],[
XORG_SGML_PATH=$prefix/share/sgml
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)
@@ -1463,14 +1495,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
diff --git a/app/xinit/config.h.in b/app/xinit/config.h.in
index d76502c7d..2fcf7962c 100644
--- a/app/xinit/config.h.in
+++ b/app/xinit/config.h.in
@@ -9,6 +9,9 @@
/* Define to 1 if you have the `killpg' function. */
#undef HAVE_KILLPG
+/* launchd support available */
+#undef HAVE_LAUNCHD
+
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
@@ -45,6 +48,9 @@
/* Define to 1 if `vfork' works. */
#undef HAVE_WORKING_VFORK
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
/* Name of package */
#undef PACKAGE
diff --git a/app/xinit/configure b/app/xinit/configure
index 6175da51b..9add8e256 100644
--- a/app/xinit/configure
+++ b/app/xinit/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for xinit 1.0.6.
+# Generated by GNU Autoconf 2.59 for xinit 1.0.8.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='xinit'
PACKAGE_TARNAME='xinit'
-PACKAGE_VERSION='1.0.6'
-PACKAGE_STRING='xinit 1.0.6'
+PACKAGE_VERSION='1.0.8'
+PACKAGE_STRING='xinit 1.0.8'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
# Factoring default headers for most tests.
@@ -310,7 +310,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP RAWCPP RAWCPPFLAGS SED build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP PKG_CONFIG ac_pt_PKG_CONFIG XINIT_CFLAGS XINIT_LIBS MCOOKIE STARTX_COOKIE_FLAGS SHELL_CMD ARCHMANDEFS XRDB XMODMAP TWM XCLOCK XTERM XSERVER XAUTH XINIT WM XCONSOLE APP_MAN_SUFFIX LIB_MAN_SUFFIX FILE_MAN_SUFFIX MISC_MAN_SUFFIX DRIVER_MAN_SUFFIX ADMIN_MAN_SUFFIX APP_MAN_DIR LIB_MAN_DIR FILE_MAN_DIR MISC_MAN_DIR DRIVER_MAN_DIR ADMIN_MAN_DIR LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP RAWCPP RAWCPPFLAGS SED build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LAUNCHD APPLE_TRUE APPLE_FALSE launchagentsdir LAUNCHD_TRUE LAUNCHD_FALSE PKG_CONFIG ac_pt_PKG_CONFIG XINIT_CFLAGS XINIT_LIBS MCOOKIE STARTX_COOKIE_FLAGS SHELL_CMD ARCHMANDEFS XRDB XMODMAP TWM XCLOCK XTERM XSERVER XAUTH XINIT WM XCONSOLE APP_MAN_SUFFIX LIB_MAN_SUFFIX FILE_MAN_SUFFIX MISC_MAN_SUFFIX DRIVER_MAN_SUFFIX ADMIN_MAN_SUFFIX APP_MAN_DIR LIB_MAN_DIR FILE_MAN_DIR MISC_MAN_DIR DRIVER_MAN_DIR ADMIN_MAN_DIR LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -791,7 +791,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures xinit 1.0.6 to adapt to many kinds of systems.
+\`configure' configures xinit 1.0.8 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -857,7 +857,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of xinit 1.0.6:";;
+ short | recursive ) echo "Configuration of xinit 1.0.8:";;
esac
cat <<\_ACEOF
@@ -883,6 +883,11 @@ Optional Packages:
--with-wm=WM Path to default window manager
--with-xconsole=XCONSOLE
Path to xconsole
+ --with-launchd Build with suppo rt for Apple's launchd (default:
+ auto)
+ --with-launchagents-dir=PATH
+ Pat h to launchd's LaunchAgents directory (default:
+ /Library/LaunchAgents)
--with-release-version=STRING
Use release version string in package name
@@ -998,7 +1003,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-xinit configure 1.0.6
+xinit configure 1.0.8
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1012,7 +1017,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by xinit $as_me 1.0.6, which was
+It was created by xinit $as_me 1.0.8, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1610,7 +1615,7 @@ fi
# Define the identity of the package.
PACKAGE='xinit'
- VERSION='1.0.6'
+ VERSION='1.0.8'
cat >>confdefs.h <<_ACEOF
@@ -2872,6 +2877,109 @@ else
fi
+if test "x$CC" != xcc; then
+ echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
+echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
+else
+ echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
+echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
+fi
+set dummy $CC; ac_cc=`echo $2 |
+ sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
+if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); };
+then
+ eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+ if test "x$CC" != xcc; then
+ # Test first that cc exists at all.
+ if { ac_try='cc -c conftest.$ac_ext >&5'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
+ if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); };
+ then
+ # cc works too.
+ :
+ else
+ # cc exists but doesn't like -o.
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+ fi
+ fi
+ fi
+else
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f conftest*
+
+fi
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_MINUS_C_MINUS_O 1
+_ACEOF
+
+fi
+
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4458,6 +4566,124 @@ else
XCONSOLE="$DEFAULT_XCONSOLE"
fi;
+
+# Check whether --with-launchd or --without-launchd was given.
+if test "${with_launchd+set}" = set; then
+ withval="$with_launchd"
+ LAUNCHD=$withval
+else
+ LAUNCHD=auto
+fi;
+
+# Check whether --with-launchagents-dir or --without-launchagents-dir was given.
+if test "${with_launchagents_dir+set}" = set; then
+ withval="$with_launchagents_dir"
+ launchagentsdir="${withval}"
+else
+ launchagentsdir="/Library/LaunchAgents"
+fi;
+
+if test "x$LAUNCHD" = "xauto"; then
+ unset LAUNCHD
+ # Extract the first word of "launchd", so it can be a program name with args.
+set dummy launchd; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LAUNCHD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$LAUNCHD"; then
+ ac_cv_prog_LAUNCHD="$LAUNCHD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LAUNCHD="yes"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_LAUNCHD" && ac_cv_prog_LAUNCHD="no"
+fi
+fi
+LAUNCHD=$ac_cv_prog_LAUNCHD
+if test -n "$LAUNCHD"; then
+ echo "$as_me:$LINENO: result: $LAUNCHD" >&5
+echo "${ECHO_T}$LAUNCHD" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+
+if test "x$LAUNCHD" = "xyes" ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LAUNCHD 1
+_ACEOF
+
+
+ case $host_os in
+ darwin*)
+ # For now, this is how we find X11.app on OS-X...
+ # A future version of launchd should let us do this cleaner
+ #XSERVER=\'\`'$(libexecdir)/x11-exec'\`\'
+
+
+if true; then
+ APPLE_TRUE=
+ APPLE_FALSE='#'
+else
+ APPLE_TRUE='#'
+ APPLE_FALSE=
+fi
+
+ ;;
+ *)
+
+
+if false; then
+ APPLE_TRUE=
+ APPLE_FALSE='#'
+else
+ APPLE_TRUE='#'
+ APPLE_FALSE=
+fi
+
+ ;;
+ esac
+else
+
+
+if false; then
+ APPLE_TRUE=
+ APPLE_FALSE='#'
+else
+ APPLE_TRUE='#'
+ APPLE_FALSE=
+fi
+
+ launchagentsdir=""
+fi
+
+
+
+if test "x$LAUNCHD" = "xyes"; then
+ LAUNCHD_TRUE=
+ LAUNCHD_FALSE='#'
+else
+ LAUNCHD_TRUE='#'
+ LAUNCHD_FALSE=
+fi
+
+
# Checks for pkg-config packages
@@ -4867,7 +5093,7 @@ cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
_ACEOF
- 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
@@ -4876,7 +5102,7 @@ cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION_MINOR $PVM
_ACEOF
- 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
@@ -5000,6 +5226,34 @@ echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${APPLE_TRUE}" && test -z "${APPLE_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"APPLE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"APPLE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${APPLE_TRUE}" && test -z "${APPLE_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"APPLE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"APPLE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${APPLE_TRUE}" && test -z "${APPLE_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"APPLE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"APPLE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${LAUNCHD_TRUE}" && test -z "${LAUNCHD_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"LAUNCHD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"LAUNCHD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
@@ -5271,7 +5525,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
-This file was extended by xinit $as_me 1.0.6, which was
+This file was extended by xinit $as_me 1.0.8, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5334,7 +5588,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-xinit config.status 1.0.6
+xinit config.status 1.0.8
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
@@ -5586,6 +5840,12 @@ s,@host_cpu@,$host_cpu,;t t
s,@host_vendor@,$host_vendor,;t t
s,@host_os@,$host_os,;t t
s,@EGREP@,$EGREP,;t t
+s,@LAUNCHD@,$LAUNCHD,;t t
+s,@APPLE_TRUE@,$APPLE_TRUE,;t t
+s,@APPLE_FALSE@,$APPLE_FALSE,;t t
+s,@launchagentsdir@,$launchagentsdir,;t t
+s,@LAUNCHD_TRUE@,$LAUNCHD_TRUE,;t t
+s,@LAUNCHD_FALSE@,$LAUNCHD_FALSE,;t t
s,@PKG_CONFIG@,$PKG_CONFIG,;t t
s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
s,@XINIT_CFLAGS@,$XINIT_CFLAGS,;t t
diff --git a/app/xinit/configure.ac b/app/xinit/configure.ac
index 195312d27..cd9769299 100644
--- a/app/xinit/configure.ac
+++ b/app/xinit/configure.ac
@@ -21,13 +21,14 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ([2.57])
-AC_INIT(xinit,[1.0.6], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xinit)
+AC_INIT(xinit,[1.0.8], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xinit)
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)
AC_PROG_CC
+AM_PROG_CC_C_O
XORG_PROG_RAWCPP
AC_PROG_INSTALL
AC_PATH_PROG(SED,sed)
@@ -103,6 +104,39 @@ AC_ARG_WITH(xconsole,
[XCONSOLE="$withval"],
[XCONSOLE="$DEFAULT_XCONSOLE"])
+AC_ARG_WITH(launchd, AS_HELP_STRING([--with-launchd], [Build with suppo
+rt for Apple's launchd (default: auto)]), [LAUNCHD=$withval], [LAUNCHD=auto])
+AC_ARG_WITH(launchagents-dir,AS_HELP_STRING([--with-launchagents-dir=PATH], [Pat
+h to launchd's LaunchAgents directory (default: /Library/LaunchAgents)]),
+ [ launchagentsdir="${withval}" ],
+ [ launchagentsdir="/Library/LaunchAgents" ])
+
+if test "x$LAUNCHD" = "xauto"; then
+ unset LAUNCHD
+ AC_CHECK_PROG(LAUNCHD, [launchd], [yes], [no])
+fi
+
+if test "x$LAUNCHD" = "xyes" ; then
+ AC_DEFINE(HAVE_LAUNCHD, 1, [launchd support available])
+
+ case $host_os in
+ darwin*)
+ # For now, this is how we find X11.app on OS-X...
+ # A future version of launchd should let us do this cleaner
+ #XSERVER=\'\`'$(libexecdir)/x11-exec'\`\'
+ AM_CONDITIONAL(APPLE, true)
+ ;;
+ *)
+ AM_CONDITIONAL(APPLE, false)
+ ;;
+ esac
+else
+ AM_CONDITIONAL(APPLE,false)
+ launchagentsdir=""
+fi
+AC_SUBST([launchagentsdir])
+AM_CONDITIONAL(LAUNCHD, [test "x$LAUNCHD" = "xyes"])
+
# Checks for pkg-config packages
PKG_CHECK_MODULES(XINIT, x11)
diff --git a/app/xinit/cpprules.in b/app/xinit/cpprules.in
new file mode 100644
index 000000000..f32eafc06
--- /dev/null
+++ b/app/xinit/cpprules.in
@@ -0,0 +1,37 @@
+# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM
+# to cpp, because that trick does not work on all ANSI C preprocessors.
+# Delete line numbers from the cpp output (-P is not portable, I guess).
+# Allow XCOMM to be preceded by whitespace and provide a means of generating
+# output lines with trailing backslashes.
+# Allow XHASH to always be substituted, even in cases where XCOMM isn't.
+
+CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \
+ -e '/^\#line *[0-9][0-9]* *.*$$/d' \
+ -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \
+ -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \
+ -e '/^[ ]*XHASH/s/XHASH/\#/' \
+ -e '/XSLASHGLOB/s/XSLASHGLOB/\/\*/' \
+ -e '/\@\@$$/s/\@\@$$/\\/'
+
+# Strings to replace in man pages
+XORGRELSTRING = @PACKAGE_STRING@
+ XORGMANNAME = X Version 11
+
+MANDEFS = \
+ -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \
+ -D__appmansuffix__=$(APP_MAN_SUFFIX) \
+ -D__filemansuffix__=$(FILE_MAN_SUFFIX) \
+ -D__libmansuffix__=$(LIB_MAN_SUFFIX) \
+ -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \
+ -D__XSERVERNAME__=Xorg -D__XCONFIGFILE__=xorg.conf \
+ -D__xinitdir__=$(XINITDIR) \
+ -D__bindir__=$(bindir) \
+ -DSHELL_CMD=$(SHELL_CMD) $(ARCHMANDEFS)
+
+SUFFIXES = .$(APP_MAN_SUFFIX) .man .cpp
+
+.cpp:
+ $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@
+
+.man.$(APP_MAN_SUFFIX):
+ $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@
diff --git a/app/xinit/org.x.X11.plist.cpp b/app/xinit/org.x.X11.plist.cpp
new file mode 100644
index 000000000..3ee22bdd1
--- /dev/null
+++ b/app/xinit/org.x.X11.plist.cpp
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Label</key>
+ <string>org.x.X11</string>
+ <key>ProgramArguments</key>
+ <array>
+#ifdef __APPLE__
+ <string>/bin/bash</string>
+ <string>--login</string>
+ <string>-c</string>
+#endif
+ <string>__bindir__/startx</string>
+ </array>
+ <key>Sockets</key>
+ <dict>
+ <key>:0</key>
+ <dict>
+ <key>SecureSocketWithKey</key>
+ <string>DISPLAY</string>
+ </dict>
+ </dict>
+ <key>ServiceIPC</key>
+ <true/>
+</dict>
+</plist>
diff --git a/app/xinit/startx.cpp b/app/xinit/startx.cpp
index a9b4199e7..c31fd7ff4 100644
--- a/app/xinit/startx.cpp
+++ b/app/xinit/startx.cpp
@@ -13,37 +13,44 @@ XCOMM Site administrators are STRONGLY urged to write nicer versions.
XCOMM
XCOMM $XFree86: xc/programs/xinit/startx.cpp,v 3.16tsi Exp $
-#if defined(__SCO__) || defined(__UNIXWARE__)
+#if defined(__SCO__) || defined(__UNIXWARE__) || defined(__APPLE__)
XCOMM Check for /usr/bin/X11 and BINDIR in the path, if not add them.
XCOMM This allows startx to be placed in a place like /usr/bin or /usr/local/bin
XCOMM and people may use X without changing their PATH.
XCOMM Note that we put our own bin directory at the front of the path, and
-XCOMM the standard SCO path at the back, since if you are using the Xorg
+XCOMM the standard system path at the back, since if you are using the Xorg
XCOMM server theres a pretty good chance you want to bias the Xorg clients
-XCOMM over the old SCO X11R5 clients.
+XCOMM over the old system's clients.
XCOMM First our compiled path
-
-bindir=BINDIR
-scobindir=/usr/bin/X11
+bindir=__bindir__
case $PATH in
- *:$bindir | *:$bindir:* | $bindir:*) ;;
- *) PATH=$bindir:$PATH ;;
+ *:$bindir | *:$bindir:* | $bindir:*) ;;
+ *) PATH=$bindir:$PATH ;;
esac
-XCOMM Now the "SCO" compiled path
+XCOMM Now the "old" compiled path
+#ifdef __APPLE__
+oldbindir=/usr/X11R6/bin
+#else
+oldbindir=/usr/bin/X11
+#endif
-case $PATH in
- *:$scobindir | *:$scobindir:* | $scobindir:*) ;;
- *) PATH=$PATH:$scobindir ;;
-esac
+if [ -d "$oldbindir" ] ; then
+ case $PATH in
+ *:$oldbindir | *:$oldbindir:* | $oldbindir:*) ;;
+ *) PATH=$PATH:$oldbindir ;;
+ esac
+fi
XCOMM Bourne shell does not automatically export modified environment variables
XCOMM so export the new PATH just in case the user changes the shell
export PATH
+#endif
+#if defined(__SCO__) || defined(__UNIXWARE__)
XCOMM Set up the XMERGE env var so that dos merge is happy under X
if [ -f /usr/lib/merge/xmergeset.sh ]; then
@@ -71,6 +78,50 @@ defaultserverargs=""
clientargs=""
serverargs=""
+#ifdef __APPLE__
+
+XCOMM Initialize defaults (this will cut down on "safe" error messages)
+if ! defaults read org.x.X11 cache_fonts >& /dev/null ; then
+ defaults write org.x.X11 cache_fonts -bool true
+fi
+
+if ! defaults read org.x.X11 no_auth >& /dev/null ; then
+ defaults write org.x.X11 no_auth -bool false
+fi
+
+if ! defaults read org.x.X11 nolisten_tcp >& /dev/null ; then
+ defaults write org.x.X11 nolisten_tcp -bool true
+fi
+
+XCOMM First, start caching fonts
+if [ x`defaults read org.x.X11 cache_fonts` = x1 ] ; then
+ if [ -x /usr/X11/bin/font_cache.sh ] ; then
+ /usr/X11/bin/font_cache.sh &
+ elif [ -x /usr/X11/bin/fc-cache ] ; then
+ /usr/X11/bin/fc-cache &
+ fi
+fi
+
+if [ x`defaults read org.x.X11 no_auth` = x0 ] ; then
+ enable_xauth=1
+else
+ enable_xauth=0
+fi
+
+if [ x`defaults read org.x.X11 nolisten_tcp` = x1 ] ; then
+ defaultserverargs="$defaultserverargs -nolisten tcp"
+fi
+
+for ((d=0; ; d++)) ; do
+ [[ -e /tmp/.X$d-lock ]] || break
+done
+defaultdisplay=":$d"
+
+#else
+enable_xauth=1
+#endif
+
+
if [ -f $userclientrc ]; then
defaultclientargs=$userclientrc
elif [ -f $sysclientrc ]; then
@@ -158,70 +209,75 @@ if [ x"$server" = x ]; then
XCOMM if no server arguments or display either, use rc file instead
if [ x"$serverargs" = x -a x"$display" = x ]; then
server="$defaultserverargs"
+#ifdef __APPLE__
+ display="$defaultdisplay"
+#endif
else
server=$defaultserver
fi
fi
-if [ x"$XAUTHORITY" = x ]; then
- XAUTHORITY=$HOME/.Xauthority
- export XAUTHORITY
-fi
+if [ x"$enable_xauth" = x1 ] ; then
+ if [ x"$XAUTHORITY" = x ]; then
+ XAUTHORITY=$HOME/.Xauthority
+ export XAUTHORITY
+ fi
-removelist=
+ removelist=
-XCOMM set up default Xauth info for this machine
-case `uname` in
-Linux*)
- if [ -z "`hostname --version 2>&1 | grep GNU`" ]; then
- hostname=`hostname -f`
- else
- hostname=`hostname`
- fi
- ;;
-*)
- hostname=`hostname`
- ;;
-esac
+ XCOMM set up default Xauth info for this machine
+ case `uname` in
+ Linux*)
+ if [ -z "`hostname --version 2>&1 | grep GNU`" ]; then
+ hostname=`hostname -f`
+ else
+ hostname=`hostname`
+ fi
+ ;;
+ *)
+ hostname=`hostname`
+ ;;
+ esac
-authdisplay=${display:-:0}
+ authdisplay=${display:-:0}
#if defined(HAS_COOKIE_MAKER) && defined(MK_COOKIE)
-mcookie=`MK_COOKIE`
+ mcookie=`MK_COOKIE`
#else
-mcookie=`dd if=/dev/random bs=16 count=1 2>/dev/null | hexdump -e \\"%08x\\"`
-if test x"$mcookie" = x; then
- echo "Couldn't create cookie"
- exit 1
-fi
+ mcookie=`dd if=/dev/random bs=16 count=1 2>/dev/null | hexdump -e \\"%08x\\"`
+ if test x"$mcookie" = x; then
+ echo "Couldn't create cookie"
+ exit 1
+ fi
#endif
-dummy=0
+ dummy=0
-XCOMM create a file with auth information for the server. ':0' is a dummy.
-xserverauthfile=$HOME/.serverauth.$$
-trap "rm -f $xserverauthfile" ERR HUP INT QUIT ILL TRAP KILL BUS TERM
-xauth -q -f $xserverauthfile << EOF
+ XCOMM create a file with auth information for the server. ':0' is a dummy.
+ xserverauthfile=$HOME/.serverauth.$$
+ trap "rm -f $xserverauthfile" HUP INT QUIT ILL TRAP KILL BUS TERM
+ xauth -q -f $xserverauthfile << EOF
add :$dummy . $mcookie
EOF
-serverargs=${serverargs}" -auth "${xserverauthfile}
-
-XCOMM now add the same credentials to the client authority file
-XCOMM if '$displayname' already exists do not overwrite it as another
-XCOMM server man need it. Add them to the '$xserverauthfile' instead.
-for displayname in $authdisplay $hostname$authdisplay; do
- authcookie=`XAUTH list "$displayname" @@
- | sed -n "s/.*$displayname[[:space:]*].*[[:space:]*]//p"` 2>/dev/null;
- if [ "z${authcookie}" = "z" ] ; then
- XAUTH -q << EOF
+ serverargs=${serverargs}" -auth "${xserverauthfile}
+
+ XCOMM now add the same credentials to the client authority file
+ XCOMM if '$displayname' already exists do not overwrite it as another
+ XCOMM server man need it. Add them to the '$xserverauthfile' instead.
+ for displayname in $authdisplay $hostname$authdisplay; do
+ authcookie=`XAUTH list "$displayname" @@
+ | sed -n "s/.*$displayname[[:space:]*].*[[:space:]*]//p"` 2>/dev/null;
+ if [ "z${authcookie}" = "z" ] ; then
+ XAUTH -q << EOF
add $displayname . $mcookie
EOF
- removelist="$displayname $removelist"
- else
- dummy=$(($dummy+1));
- XAUTH -q -f $xserverauthfile << EOF
+ removelist="$displayname $removelist"
+ else
+ dummy=$(($dummy+1));
+ XAUTH -q -f $xserverauthfile << EOF
add :$dummy . $authcookie
EOF
- fi
-done
+ fi
+ done
+fi
#if defined(__SCO__) || defined(__UNIXWARE__)
if [ "$REMOTE_SERVER" = "TRUE" ]; then
@@ -233,13 +289,15 @@ fi
XINIT $client $clientargs -- $server $display $serverargs
#endif
-if [ x"$removelist" != x ]; then
- XAUTH remove $removelist
-fi
-if [ x"$xserverauthfile" != x ]; then
- rm -f $xserverauthfile
+if [ x"$enable_xauth" = x1 ] ; then
+ if [ x"$removelist" != x ]; then
+ XAUTH remove $removelist
+ fi
+ if [ x"$xserverauthfile" != x ]; then
+ rm -f $xserverauthfile
+ fi
fi
-
+
/*
* various machines need special cleaning up
*/
diff --git a/app/xinit/xinit.c b/app/xinit/xinit.c
index 6c0dfe537..bdd739690 100644
--- a/app/xinit/xinit.c
+++ b/app/xinit/xinit.c
@@ -1,6 +1,6 @@
/* $Xorg: xinit.c,v 1.5 2001/02/09 02:05:49 xorgcvs Exp $ */
/* $XdotOrg: xc/programs/xinit/xinit.c,v 1.4 2005/10/04 01:27:34 ajax Exp $ */
-/* $OpenBSD: xinit.c,v 1.4 2008/04/20 13:25:46 matthieu Exp $ */
+/* $OpenBSD: xinit.c,v 1.5 2008/04/20 13:46:02 matthieu Exp $ */
/*
@@ -40,6 +40,12 @@ in this Software without prior written authorization from The Open Group.
#include <ctype.h>
#include <stdint.h>
+#ifdef __APPLE__
+#include <CoreServices/CoreServices.h>
+#define kX11AppBundleId "org.x.X11"
+#define kX11AppBundlePath "/Contents/MacOS/X11"
+#endif
+
#ifdef X_POSIX_C_SOURCE
#define _POSIX_C_SOURCE X_POSIX_C_SOURCE
#include <signal.h>
@@ -137,12 +143,11 @@ const char * const server_names[] = {
#ifdef XORG
"Xorg Common X server for most displays",
#endif
-#ifdef __DARWIN__
- "XDarwin Darwin/Mac OS X IOKit displays",
- "XDarwinQuartz Mac OS X Quartz displays",
- "XDarwinStartup Auto-select between XDarwin and XDarwinQuartz",
+#ifdef __APPLE__
+ "Xquartz Mac OSX Quartz displays.",
#endif
"Xvfb Virtual frame buffer",
+ "Xfake kdrive-based virtual frame buffer",
"Xnest X server nested in a window on another X server",
"Xephyr kdrive-based nested X server",
NULL};
@@ -162,18 +167,21 @@ char xserverrcbuf[256];
#define OK_EXIT 0
#define ERR_EXIT 1
-char *default_server = "X";
-char *default_display = ":0"; /* choose most efficient */
-char *default_client[] = {"xterm", "-geometry", "+1+1", "-n", "login", NULL};
-char *serverargv[100];
-char *clientargv[100];
-char **server = serverargv + 2; /* make sure room for sh .xserverrc args */
-char **client = clientargv + 2; /* make sure room for sh .xinitrc args */
-char *displayNum;
-char *program;
-Display *xd; /* server connection */
+static char *default_server = "X";
+static char *default_display = ":0"; /* choose most efficient */
+static char *default_client[] = {"xterm", "-geometry", "+1+1", "-n", "login", NULL};
+static char *serverargv[100];
+static char *clientargv[100];
+static char **server = serverargv + 2; /* make sure room for sh .xserverrc args */
+static char **client = clientargv + 2; /* make sure room for sh .xinitrc args */
+static char *displayNum = NULL;
+static char *program = NULL;
+static Display *xd = NULL; /* server connection */
+#ifdef __APPLE__
+static char x11_path[PATH_MAX];
+#endif
#ifndef SYSV
-#if defined(__CYGWIN__) || defined(SVR4) || defined(_POSIX_SOURCE) || defined(CSRG_BASED) || defined(__UNIXOS2__) || defined(Lynx)
+#if defined(__CYGWIN__) || defined(SVR4) || defined(_POSIX_SOURCE) || defined(CSRG_BASED) || defined(__UNIXOS2__) || defined(Lynx) || defined(__APPLE__)
int status;
#else
union wait status;
@@ -208,7 +216,7 @@ sigCatch(int sig)
static SIGVAL
sigAlarm(int sig)
{
-#if defined(SYSV) || defined(SVR4) || defined(linux) || defined(__UNIXOS2__)
+#if defined(SYSV) || defined(SVR4) || defined(linux) || defined(__UNIXOS2__) || defined(__APPLE__)
signal (sig, sigAlarm);
#endif
}
@@ -216,16 +224,61 @@ sigAlarm(int sig)
static SIGVAL
sigUsr1(int sig)
{
-#if defined(SYSV) || defined(SVR4) || defined(linux) || defined(__UNIXOS2__)
+#if defined(SYSV) || defined(SVR4) || defined(linux) || defined(__UNIXOS2__) || defined(__APPLE__)
signal (sig, sigUsr1);
#endif
}
+#ifdef __APPLE__
+static void set_x11_path() {
+ CFURLRef appURL = NULL;
+ OSStatus osstatus = LSFindApplicationForInfo(kLSUnknownCreator, CFSTR(kX11AppBundleId), nil, nil, &appURL);
+
+ switch (osstatus) {
+ case noErr:
+ if (appURL == NULL) {
+ fprintf(stderr, "xinit: Invalid response from LSFindApplicationForInfo(%s)\n",
+ kX11AppBundleId);
+ exit(1);
+ }
+
+ if (!CFURLGetFileSystemRepresentation(appURL, true, (unsigned char *)x11_path, sizeof(x11_path))) {
+ fprintf(stderr, "xinit: Error resolving URL for %s\n", kX11AppBundleId);
+ exit(2);
+ }
+
+ strlcat(x11_path, kX11AppBundlePath, sizeof(x11_path));
+#ifdef DEBUG
+ fprintf(stderr, "xinit: X11.app = %s\n", x11_path);
+#endif
+ break;
+ case kLSApplicationNotFoundErr:
+ fprintf(stderr, "xinit: Unable to find application for %s\n", kX11AppBundleId);
+ exit(4);
+ default:
+ fprintf(stderr, "xinit: Unable to find application for %s, error code = %d\n",
+ kX11AppBundleId, (int)osstatus);
+ exit(5);
+ }
+}
+#endif
+
static void
Execute(char **vec, /* has room from up above */
char **envp)
{
- Execvpe (vec[0], vec, envp);
+ char *file = vec[0];
+#ifdef __APPLE__
+ /* This is ugly, but currently, we need to trick OS-X into thinking X is in
+ * the X11.app bundle. Hopefully UI, icons, etc will eventually be set
+ * by Xquartz, but this is how we're doing it for now. -JH
+ */
+ if(!strcmp(file, "/usr/X11/bin/X") || !strcmp(file, "/usr/X11/bin/Xquartz") || !strcmp(file, "X") || !strcmp(file, "Xquartz")) {
+ vec[0] = x11_path;
+ fprintf(stderr, "xinit: Detected Xquartz startup, setting file=%s, argv[0]=%s\n", file, vec[0]);
+ }
+#endif
+ Execvpe (file, vec, envp);
#ifndef __UNIXOS2__
if (access (vec[0], R_OK) == 0) {
vec--; /* back it up to stuff shell in */
@@ -253,6 +306,10 @@ main(int argc, char *argv[], char *envp[])
int start_of_client_args, start_of_server_args;
struct sigaction sa;
+#ifdef __APPLE__
+ set_x11_path();
+#endif
+
#ifdef __UNIXOS2__
envsave = envp; /* circumvent an EMX problem */
@@ -400,7 +457,6 @@ main(int argc, char *argv[], char *envp[])
}
}
-
/*
* put the display name into the environment
*/
@@ -497,7 +553,7 @@ processTimeout(int timeout, char *string)
break;
alarm(0);
#else /* SYSV */
-#if defined(SVR4) || defined(_POSIX_SOURCE) || defined(Lynx)
+#if defined(SVR4) || defined(_POSIX_SOURCE) || defined(Lynx) || defined(__APPLE__)
if ((pidfound = waitpid(serverpid, &status, WNOHANG)) == serverpid)
break;
#else
@@ -817,7 +873,7 @@ set_environment(void)
{
int nenvvars;
char **newPtr, **oldPtr;
- static char displaybuf[256];
+ static char displaybuf[512];
/* count number of environment variables */
for (oldPtr = environ; *oldPtr; oldPtr++) ;
diff --git a/app/xinit/xinitrc.cpp b/app/xinit/xinitrc.cpp
index 6c100734b..d9be5cb8b 100644
--- a/app/xinit/xinitrc.cpp
+++ b/app/xinit/xinitrc.cpp
@@ -1,6 +1,6 @@
XCOMM!SHELL_CMD
XCOMM $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $
-XCOMM $OpenBSD: xinitrc.cpp,v 1.2 2006/11/26 17:17:57 matthieu Exp $
+XCOMM $OpenBSD: xinitrc.cpp,v 1.3 2008/04/20 13:46:02 matthieu Exp $
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
@@ -10,7 +10,15 @@ sysmodmap=XINITDIR/.Xmodmap
XCOMM merge in defaults and keymaps
if [ -f $sysresources ]; then
+#ifdef __APPLE__
+ if [ -x /usr/bin/cpp ] ; then
+ XRDB -merge $sysresources
+ else
+ XRDB -nocpp -merge $sysresources
+ fi
+#else
XRDB -merge $sysresources
+#endif
fi
if [ -f $sysmodmap ]; then
@@ -18,7 +26,15 @@ if [ -f $sysmodmap ]; then
fi
if [ -f $userresources ]; then
+#ifdef __APPLE__
+ if [ -x /usr/bin/cpp ] ; then
+ XRDB -merge $userresources
+ else
+ XRDB -nocpp -merge $userresources
+ fi
+#else
XRDB -merge $userresources
+#endif
fi
if [ -f $usermodmap ]; then