diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2008-06-18 20:31:52 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2008-06-18 20:31:52 +0000 |
commit | 05315c63f9ce9e9172f492c5b89285b807419fa2 (patch) | |
tree | 0673ae8f999b4f723d071bba566777df69e353de /app/xinit | |
parent | b63f6b44c8d3e3d35856205794ff5563c1df02cc (diff) |
update to xinit 1.1.0.
Diffstat (limited to 'app/xinit')
-rw-r--r-- | app/xinit/ChangeLog | 159 | ||||
-rw-r--r-- | app/xinit/Makefile.am | 14 | ||||
-rw-r--r-- | app/xinit/Makefile.in | 191 | ||||
-rw-r--r-- | app/xinit/configure | 1556 | ||||
-rw-r--r-- | app/xinit/configure.ac | 45 | ||||
-rw-r--r-- | app/xinit/org.x.startx.plist.cpp | 25 | ||||
-rw-r--r-- | app/xinit/privileged_startx/10-tmpdirs.cpp | 37 | ||||
-rw-r--r-- | app/xinit/privileged_startx/20-font_cache.cpp | 35 | ||||
-rw-r--r-- | app/xinit/privileged_startx/Makefile.am | 74 | ||||
-rw-r--r-- | app/xinit/privileged_startx/Makefile.in | 612 | ||||
-rw-r--r-- | app/xinit/privileged_startx/client.c | 56 | ||||
-rw-r--r-- | app/xinit/privileged_startx/org.x.privileged_startx.plist.cpp | 21 | ||||
-rw-r--r-- | app/xinit/privileged_startx/privileged_startx.c | 59 | ||||
-rw-r--r-- | app/xinit/privileged_startx/privileged_startx.defs | 40 | ||||
-rw-r--r-- | app/xinit/privileged_startx/privileged_startx_types.h | 6 | ||||
-rw-r--r-- | app/xinit/privileged_startx/server.c | 250 | ||||
-rw-r--r-- | app/xinit/startx.cpp | 47 | ||||
-rw-r--r-- | app/xinit/xinit.c | 91 | ||||
-rw-r--r-- | app/xinit/xinitrc.cpp | 14 |
19 files changed, 3106 insertions, 226 deletions
diff --git a/app/xinit/ChangeLog b/app/xinit/ChangeLog index 72b7fdc25..e51f34d10 100644 --- a/app/xinit/ChangeLog +++ b/app/xinit/ChangeLog @@ -1,3 +1,162 @@ +commit 44e2ee01b456deb2630d21786d19ee2734d2f40a +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed May 28 12:01:35 2008 -0700 + + Apple: Don't use launchd on Tiger since it doesn't support the features we need. + + https://bugs.freedesktop.org/show_bug.cgi?id=15893 + +commit d315445cb85876cda56f46cb657167d4eb906ba0 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Wed May 28 11:54:22 2008 -0700 + + Properly handle using xserverrc + +commit 3c5e2ed686bd3ab39e2c1e87feffb5990603cf3c +Author: Adam Jackson <ajax@redhat.com> +Date: Wed May 21 14:34:52 2008 -0400 + + xinit 1.0.9 + +commit c07501f69239e9c1448736ad7e689a2c3da49af9 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed May 21 14:29:55 2008 -0400 + + Unset session environment variables so startx works within a running session. + +commit ef2610f44c7cf40489203fddc77ddcdfb7764eed +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue May 13 16:28:33 2008 -0700 + + Use /bin/ksh instead of /bin/sh on Solaris + +commit d3bc7001315a8ba13be073af86fe710740b2d4c3 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue May 13 16:25:49 2008 -0700 + + Check for proper cookie creation on all platforms + +commit ef7abe2e72074f8252f0812ab2ca05dff7e76a38 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue May 13 16:25:22 2008 -0700 + + Use od on /dev/random to generate cookie on Solaris + +commit e0e89545db1fc08ffe49b2b24455bb30137da671 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon May 12 13:17:46 2008 -0700 + + Apple: Don't need to spew unneccessary 'directory exists' messages. + +commit 85561f8347b33422dd4b0ea11911347c0666e409 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue May 6 00:07:18 2008 -0700 + + Apple: No need for these bits being here in xinit as of xserver-1.4.0-apple9 + +commit 280774466dc9f57b4b46c618345f7938290dbb2c +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Apr 25 19:00:23 2008 -0700 + + Apple: Added some OSX version protection, so this will still compile on Tiger and below. + +commit 0806ae2ecfdcb4ad5f3b7a66dcc9bc5d29d72649 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Apr 25 15:12:54 2008 -0700 + + Apple: Use CFProcessPath instead of argv[0] trick. + +commit edc3112679af749f0c6fc54b2eec1b89aaf0d0c8 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sun Apr 20 17:30:14 2008 +0200 + + Replace sprintf() and strcpy() with snprintf(). + +commit 47d561fd6efb8923cfbace6fea40dfeb314b4662 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Apr 19 08:50:45 2008 -0700 + + Cleaned up handling of defaultserver{,args} + Per comments from Jeremy Reed on the list... basically doing for everyone what I do for Apple + +commit f6e75ebf5f7f245e1cdeb883a1d2db74f2451fd4 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Apr 19 08:47:20 2008 -0700 + + Apple: Fixed make dist to include a missing header and not include generated sources + +commit 2b06b58a328e13df4704df8a48d4cd0b1100ba7e +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Thu Apr 17 17:19:41 2008 -0700 + + Apple: Added privileged_startx + +commit fe5af014f2645d1ecf981d40d3c10a3621e9ec56 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Apr 14 13:05:26 2008 -0700 + + Apple: Wait for privileged_startx to finish, so we don't race to create /tmp/.X11-unix + +commit d5590dba3cce39367762d39822094ca51000142b +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Apr 13 23:15:27 2008 -0700 + + Apple: We renamed font_cache.sh to font_cache for better consistency... Changing startx to work with this + +commit 5ef443bb6bff0a03ee00105d9bf95bc3f6f82b11 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sun Apr 13 19:51:18 2008 -0700 + + Apple: privileged_startx is in XINITDIR + +commit c1b70ca67ecd12d6837584e7ef4abd01ee3b7ad9 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Tue Apr 8 17:25:54 2008 -0700 + + Correctly handle users with spaces in $HOME + +commit 1cb4bb208d481967fb736acf10c6ac2b66bf3181 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Sat Apr 5 17:23:02 2008 -0700 + + Apple: Renamed LaunchAgent to org.x.startx to distinguish it from the org.x.X11 application + +commit f7c706ff46d4a2364d65731cd1c3135ef7987380 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Apr 4 22:49:51 2008 -0700 + + Apple: Execute /usr/X11/bin/privileged_startx if it's present + +commit ca08a36d10f15be6d230a9af92288da4cb24cd43 +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Fri Apr 4 02:31:10 2008 -0700 + + Apple: Fixed issue where display would not be passed correctly to the server if nolisten tcp was enabled. + +commit 8c52bd4509b7fe5a74026b5bc638d59add9e8945 +Author: Jeremy C. Reed <reed@tx.reedmedia.net> +Date: Sat Mar 15 18:23:45 2008 -0500 + + Use /dev/urandom for cookie it it exists + else fall back to /dev/random. + Not doing in configure.ac because can't easily check for + existence when doing cross-builds. + (Alternative would be to define this for every operating system + in configure.ac. Currently only is defined for OpenBSD. + Systems that have mcookie also will not be effected.) + +commit 062524614fdd4f11f32ba3d054f7fc16b9bc5f12 +Author: Matthieu Herrb <matthieu@bluenote.herrb.net> +Date: Sat Mar 8 19:02:05 2008 +0100 + + OpenBSD: use openssl rand -hex 16 to generate the cookie. + +commit 3eaee22196a03d88c419c42470baf562552c1a3b +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Mar 6 17:09:45 2008 -0500 + + xinit 1.0.8 + commit 96c8650369a99e344b4e3510f713b331d83c4272 Author: Jeremy Huddleston <jeremy@tifa.local> Date: Sun Mar 2 10:32:58 2008 -0800 diff --git a/app/xinit/Makefile.am b/app/xinit/Makefile.am index 171e31b7c..c1670f292 100644 --- a/app/xinit/Makefile.am +++ b/app/xinit/Makefile.am @@ -27,10 +27,6 @@ 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 @@ -65,10 +61,14 @@ CPP_FILES_FLAGS = \ -D__bindir__="$(bindir)" if LAUNCHD -launchagents_PRE = org.x.X11.plist.pre -launchagents_DATA = $(launchagents_PRE:plist.pre=plist) +launchagents_PRE = org.x.startx.plist.cpp +launchagents_DATA = $(launchagents_PRE:plist.cpp=plist) + +SUBDIRS = privileged_startx endif +DIST_SUBDIRS = privileged_startx + xinitrc: xinitrc.cpp Makefile startx: startx.cpp Makefile @@ -76,7 +76,7 @@ xinitrc_DATA = xinitrc CLEANFILES = xinitrc startx $(appman_DATA) $(launchagents_DATA) -EXTRA_DIST = xinitrc.cpp startx.cpp org.x.X11.plist.cpp $(appman_PRE) \ +EXTRA_DIST = xinitrc.cpp startx.cpp org.x.startx.plist.cpp $(appman_PRE) \ startx.cmd xinitrc.cmd xinit.def ChangeLog autogen.sh .PHONY: ChangeLog diff --git a/app/xinit/Makefile.in b/app/xinit/Makefile.in index 4e3de3b85..edf5a8dae 100644 --- a/app/xinit/Makefile.in +++ b/app/xinit/Makefile.in @@ -102,6 +102,12 @@ CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(xinit_SOURCES) DIST_SOURCES = $(xinit_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -131,8 +137,6 @@ 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@ @@ -234,6 +238,7 @@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ launchagentsdir = @launchagentsdir@ +launchdaemonsdir = @launchdaemonsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ @@ -250,7 +255,6 @@ 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 @@ -303,15 +307,17 @@ CPP_FILES_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) +@LAUNCHD_TRUE@launchagents_PRE = org.x.startx.plist.cpp +@LAUNCHD_TRUE@launchagents_DATA = $(launchagents_PRE:plist.cpp=plist) +@LAUNCHD_TRUE@SUBDIRS = privileged_startx +DIST_SUBDIRS = privileged_startx xinitrc_DATA = xinitrc CLEANFILES = xinitrc startx $(appman_DATA) $(launchagents_DATA) -EXTRA_DIST = xinitrc.cpp startx.cpp org.x.X11.plist.cpp $(appman_PRE) \ +EXTRA_DIST = xinitrc.cpp startx.cpp org.x.startx.plist.cpp $(appman_PRE) \ startx.cmd xinitrc.cmd xinit.def ChangeLog autogen.sh all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-am + $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .$(APP_MAN_SUFFIX) .man .cpp .c .o .obj @@ -499,6 +505,77 @@ uninstall-xinitrcDATA: rm -f "$(DESTDIR)$(xinitrcdir)/$$f"; \ done +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -509,10 +586,23 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) mkid -fID $$unique tags: TAGS -TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ @@ -525,7 +615,7 @@ TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $$tags $$unique; \ fi ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ @@ -576,6 +666,21 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(mkdir_p) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + distdir) \ + || exit 1; \ + fi; \ + done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook @@ -677,21 +782,22 @@ distcleancheck: distclean $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am -check: check-am +check: check-recursive all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) config.h -installdirs: +installdirs: installdirs-recursive +installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(launchagentsdir)" "$(DESTDIR)$(xinitrcdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ @@ -708,24 +814,24 @@ 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." -clean: clean-am +clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am +html: html-recursive -info: info-am +info: info-recursive info-am: @@ -734,28 +840,28 @@ install-data-am: install-appmanDATA install-launchagentsDATA \ install-exec-am: install-binPROGRAMS install-binSCRIPTS -install-info: install-info-am +install-info: install-info-recursive install-man: installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic -pdf: pdf-am +pdf: pdf-recursive pdf-am: -ps: ps-am +ps: ps-recursive ps-am: @@ -763,20 +869,25 @@ uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \ 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 \ - 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 \ - install-data install-data-am install-exec install-exec-am \ - 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-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ + check-am clean clean-binPROGRAMS clean-generic clean-recursive \ + ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ + dist-hook dist-shar dist-tarZ dist-zip distcheck distclean \ + distclean-compile distclean-generic distclean-hdr \ + distclean-recursive distclean-tags distcleancheck distdir \ + distuninstallcheck dvi 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-launchagentsDATA install-man install-strip \ + install-xinitrcDATA installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + maintainer-clean-recursive mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-recursive pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-appmanDATA uninstall-binPROGRAMS \ uninstall-binSCRIPTS uninstall-info-am \ uninstall-launchagentsDATA uninstall-xinitrcDATA diff --git a/app/xinit/configure b/app/xinit/configure index 9add8e256..a8cea198d 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.8. +# Generated by GNU Autoconf 2.59 for xinit 1.1.0. # # 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.8' -PACKAGE_STRING='xinit 1.0.8' +PACKAGE_VERSION='1.1.0' +PACKAGE_STRING='xinit 1.1.0' 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 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_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 launchagentsdir launchdaemonsdir 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.8 to adapt to many kinds of systems. +\`configure' configures xinit 1.1.0 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.8:";; + short | recursive ) echo "Configuration of xinit 1.1.0:";; esac cat <<\_ACEOF @@ -883,11 +883,14 @@ 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: + --with-launchd Build with support for Apple's launchd (default: auto) --with-launchagents-dir=PATH - Pat h to launchd's LaunchAgents directory (default: + Path to launchd's LaunchAgents directory (default: /Library/LaunchAgents) + --with-launchdaemons-dir=PATH + Path to launchd's LaunchDaemonss directory (default: + /Library/LaunchDaemons) --with-release-version=STRING Use release version string in package name @@ -1003,7 +1006,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -xinit configure 1.0.8 +xinit configure 1.1.0 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -1017,7 +1020,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.8, which was +It was created by xinit $as_me 1.1.0, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1615,7 +1618,7 @@ fi # Define the identity of the package. PACKAGE='xinit' - VERSION='1.0.8' + VERSION='1.1.0' cat >>confdefs.h <<_ACEOF @@ -4583,9 +4586,22 @@ else launchagentsdir="/Library/LaunchAgents" fi; +# Check whether --with-launchdaemons-dir or --without-launchdaemons-dir was given. +if test "${with_launchdaemons_dir+set}" = set; then + withval="$with_launchdaemons_dir" + launchdaemonsdir="${withval}" +else + launchdaemonsdir="/Library/LaunchDaemons" +fi; + if test "x$LAUNCHD" = "xauto"; then unset LAUNCHD - # Extract the first word of "launchd", so it can be a program name with args. + case $host_os in + darwin8*) + LAUNCHD=no + ;; + *) + # 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 @@ -4621,6 +4637,8 @@ else echo "${ECHO_T}no" >&6 fi + ;; + esac fi if test "x$LAUNCHD" = "xyes" ; then @@ -4629,52 +4647,14 @@ 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="" + launchdaemonsdir="" fi + if test "x$LAUNCHD" = "xyes"; then LAUNCHD_TRUE= LAUNCHD_FALSE='#' @@ -4962,6 +4942,9 @@ case $host_os in *openbsd*) MCOOKIE='/usr/sbin/openssl rand -hex 16' ;; + *solaris*) + MCOOKIE="/usr/bin/od -X -A n -N 16 /dev/urandom | /usr/bin/tr -d ' '" + ;; esac if test "x$MCOOKIE" != x ; then @@ -4969,8 +4952,12 @@ if test "x$MCOOKIE" != x ; then fi -# Additional substitutions in xinitrc & man pages +# Additional substitutions in startx, xinitrc & man pages case $host_os in + *solaris*) + SHELL_CMD="/bin/ksh" + ARCHMANDEFS="" + ;; *sco*) SHELL_CMD="/bin/ksh" ARCHMANDEFS="-D__SCOMAN__" @@ -5226,24 +5213,1461 @@ 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. +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 +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by xinit $as_me 1.1.0, which was +generated by GNU Autoconf 2.59. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to <bug-autoconf@gnu.org>." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +xinit config.status 1.1.0 +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2003 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +INSTALL="$INSTALL" +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS section. +# + +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@CYGPATH_W@,$CYGPATH_W,;t t +s,@PACKAGE@,$PACKAGE,;t t +s,@VERSION@,$VERSION,;t t +s,@ACLOCAL@,$ACLOCAL,;t t +s,@AUTOCONF@,$AUTOCONF,;t t +s,@AUTOMAKE@,$AUTOMAKE,;t t +s,@AUTOHEADER@,$AUTOHEADER,;t t +s,@MAKEINFO@,$MAKEINFO,;t t +s,@install_sh@,$install_sh,;t t +s,@STRIP@,$STRIP,;t t +s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t +s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t +s,@mkdir_p@,$mkdir_p,;t t +s,@AWK@,$AWK,;t t +s,@SET_MAKE@,$SET_MAKE,;t t +s,@am__leading_dot@,$am__leading_dot,;t t +s,@AMTAR@,$AMTAR,;t t +s,@am__tar@,$am__tar,;t t +s,@am__untar@,$am__untar,;t t +s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t +s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t +s,@MAINT@,$MAINT,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@DEPDIR@,$DEPDIR,;t t +s,@am__include@,$am__include,;t t +s,@am__quote@,$am__quote,;t t +s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t +s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t +s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t +s,@CCDEPMODE@,$CCDEPMODE,;t t +s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t +s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t +s,@CPP@,$CPP,;t t +s,@RAWCPP@,$RAWCPP,;t t +s,@RAWCPPFLAGS@,$RAWCPPFLAGS,;t t +s,@SED@,$SED,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +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,@launchagentsdir@,$launchagentsdir,;t t +s,@launchdaemonsdir@,$launchdaemonsdir,;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 +s,@XINIT_LIBS@,$XINIT_LIBS,;t t +s,@MCOOKIE@,$MCOOKIE,;t t +s,@STARTX_COOKIE_FLAGS@,$STARTX_COOKIE_FLAGS,;t t +s,@SHELL_CMD@,$SHELL_CMD,;t t +s,@ARCHMANDEFS@,$ARCHMANDEFS,;t t +s,@XRDB@,$XRDB,;t t +s,@XMODMAP@,$XMODMAP,;t t +s,@TWM@,$TWM,;t t +s,@XCLOCK@,$XCLOCK,;t t +s,@XTERM@,$XTERM,;t t +s,@XSERVER@,$XSERVER,;t t +s,@XAUTH@,$XAUTH,;t t +s,@XINIT@,$XINIT,;t t +s,@WM@,$WM,;t t +s,@XCONSOLE@,$XCONSOLE,;t t +s,@APP_MAN_SUFFIX@,$APP_MAN_SUFFIX,;t t +s,@LIB_MAN_SUFFIX@,$LIB_MAN_SUFFIX,;t t +s,@FILE_MAN_SUFFIX@,$FILE_MAN_SUFFIX,;t t +s,@MISC_MAN_SUFFIX@,$MISC_MAN_SUFFIX,;t t +s,@DRIVER_MAN_SUFFIX@,$DRIVER_MAN_SUFFIX,;t t +s,@ADMIN_MAN_SUFFIX@,$ADMIN_MAN_SUFFIX,;t t +s,@APP_MAN_DIR@,$APP_MAN_DIR,;t t +s,@LIB_MAN_DIR@,$LIB_MAN_DIR,;t t +s,@FILE_MAN_DIR@,$FILE_MAN_DIR,;t t +s,@MISC_MAN_DIR@,$MISC_MAN_DIR,;t t +s,@DRIVER_MAN_DIR@,$DRIVER_MAN_DIR,;t t +s,@ADMIN_MAN_DIR@,$ADMIN_MAN_DIR,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + esac + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_HEADER section. +# + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' +ac_uC=' ' +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + # Do quote $f, to prevent DOS paths from being IFS'd. + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null +do + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # grep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +# Compute $ac_file's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $ac_file | $ac_file:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || +$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X$ac_file : 'X\(//\)[^/]' \| \ + X$ac_file : 'X\(//\)$' \| \ + X$ac_file : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X$ac_file | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'`/stamp-h$_am_stamp_count +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`(dirname "$mf") 2>/dev/null || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`(dirname "$file") 2>/dev/null || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p $dirpart/$fdir + else + as_dir=$dirpart/$fdir + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 +echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} + { (exit 1); exit 1; }; }; } + + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + esac +done +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + + ac_config_files="$ac_config_files privileged_startx/Makefile" +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"APPLE\" was never defined. +echo "$as_me: error: conditional \"MAINTAINER_MODE\" 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. +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"APPLE\" was never defined. +echo "$as_me: error: conditional \"AMDEP\" 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. +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"APPLE\" was never defined. +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 @@ -5525,7 +6949,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by xinit $as_me 1.0.8, which was +This file was extended by xinit $as_me 1.1.0, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5588,7 +7012,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -xinit config.status 1.0.8 +xinit config.status 1.1.0 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" @@ -5699,6 +7123,7 @@ do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "privileged_startx/Makefile" ) CONFIG_FILES="$CONFIG_FILES privileged_startx/Makefile" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 @@ -5841,9 +7266,8 @@ 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,@launchdaemonsdir@,$launchdaemonsdir,;t t s,@LAUNCHD_TRUE@,$LAUNCHD_TRUE,;t t s,@LAUNCHD_FALSE@,$LAUNCHD_FALSE,;t t s,@PKG_CONFIG@,$PKG_CONFIG,;t t diff --git a/app/xinit/configure.ac b/app/xinit/configure.ac index cd9769299..ad8b55628 100644 --- a/app/xinit/configure.ac +++ b/app/xinit/configure.ac @@ -21,7 +21,7 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ([2.57]) -AC_INIT(xinit,[1.0.8], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xinit) +AC_INIT(xinit,[1.1.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xinit) AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE @@ -104,37 +104,34 @@ 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)]), +AC_ARG_WITH(launchd, AS_HELP_STRING([--with-launchd], [Build with support for Apple's launchd (default: auto)]), [LAUNCHD=$withval], [LAUNCHD=auto]) +AC_ARG_WITH(launchagents-dir, AS_HELP_STRING([--with-launchagents-dir=PATH], [Path to launchd's LaunchAgents directory (default: /Library/LaunchAgents)]), [ launchagentsdir="${withval}" ], [ launchagentsdir="/Library/LaunchAgents" ]) +AC_ARG_WITH(launchdaemons-dir, AS_HELP_STRING([--with-launchdaemons-dir=PATH], [Path to launchd's LaunchDaemonss directory (default: /Library/LaunchDaemons)]), + [ launchdaemonsdir="${withval}" ], + [ launchdaemonsdir="/Library/LaunchDaemons" ]) 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) + darwin8*) + LAUNCHD=no ;; *) - AM_CONDITIONAL(APPLE, false) + AC_CHECK_PROG(LAUNCHD, [launchd], [yes], [no]) ;; esac +fi + +if test "x$LAUNCHD" = "xyes" ; then + AC_DEFINE(HAVE_LAUNCHD, 1, [launchd support available]) else - AM_CONDITIONAL(APPLE,false) launchagentsdir="" + launchdaemonsdir="" fi AC_SUBST([launchagentsdir]) +AC_SUBST([launchdaemonsdir]) AM_CONDITIONAL(LAUNCHD, [test "x$LAUNCHD" = "xyes"]) # Checks for pkg-config packages @@ -156,6 +153,9 @@ case $host_os in *openbsd*) MCOOKIE='/usr/sbin/openssl rand -hex 16' ;; + *solaris*) + MCOOKIE="/usr/bin/od -X -A n -N 16 /dev/urandom | /usr/bin/tr -d ' '" + ;; esac if test "x$MCOOKIE" != x ; then @@ -163,9 +163,13 @@ if test "x$MCOOKIE" != x ; then fi AC_SUBST(STARTX_COOKIE_FLAGS) -# Additional substitutions in xinitrc & man pages +# Additional substitutions in startx, xinitrc & man pages case $host_os in - *sco*) + *solaris*) + SHELL_CMD="/bin/ksh" + ARCHMANDEFS="" + ;; + *sco*) SHELL_CMD="/bin/ksh" ARCHMANDEFS="-D__SCOMAN__" ;; @@ -196,3 +200,4 @@ XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION AC_OUTPUT([Makefile]) +AC_OUTPUT([privileged_startx/Makefile]) diff --git a/app/xinit/org.x.startx.plist.cpp b/app/xinit/org.x.startx.plist.cpp new file mode 100644 index 000000000..42c9f7009 --- /dev/null +++ b/app/xinit/org.x.startx.plist.cpp @@ -0,0 +1,25 @@ +<?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.startx</string> + <key>ProgramArguments</key> + <array> + <string>/bin/bash</string> + <string>--login</string> + <string>-c</string> + <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/privileged_startx/10-tmpdirs.cpp b/app/xinit/privileged_startx/10-tmpdirs.cpp new file mode 100644 index 000000000..e30abac85 --- /dev/null +++ b/app/xinit/privileged_startx/10-tmpdirs.cpp @@ -0,0 +1,37 @@ +XCOMM!/bin/sh +XCOMM Copyright (c) 2008 Apple Inc. +XCOMM +XCOMM Permission is hereby granted, free of charge, to any person +XCOMM obtaining a copy of this software and associated documentation files +XCOMM (the "Software"), to deal in the Software without restriction, +XCOMM including without limitation the rights to use, copy, modify, merge, +XCOMM publish, distribute, sublicense, and/or sell copies of the Software, +XCOMM and to permit persons to whom the Software is furnished to do so, +XCOMM subject to the following conditions: +XCOMM +XCOMM The above copyright notice and this permission notice shall be +XCOMM included in all copies or substantial portions of the Software. +XCOMM +XCOMM THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +XCOMM EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +XCOMM MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +XCOMM NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT +XCOMM HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +XCOMM WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +XCOMM OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +XCOMM DEALINGS IN THE SOFTWARE. +XCOMM +XCOMM Except as contained in this notice, the name(s) of the above +XCOMM copyright holders shall not be used in advertising or otherwise to +XCOMM promote the sale, use or other dealings in this Software without +XCOMM prior written authorization. + +XCOMM Make sure these are owned by root +for dir in /tmp/.ICE-unix /tmp/.X11-unix /tmp/.font-unix ; do + # Use mktemp rather than mkdir to avoid possible security issue + # if $dir exists and is a symlink + if mktemp -d ${dir} >& /dev/null ; then + chmod 1777 $dir + chown root:wheel $dir + fi +done diff --git a/app/xinit/privileged_startx/20-font_cache.cpp b/app/xinit/privileged_startx/20-font_cache.cpp new file mode 100644 index 000000000..c13384b63 --- /dev/null +++ b/app/xinit/privileged_startx/20-font_cache.cpp @@ -0,0 +1,35 @@ +XCOMM!/bin/sh +XCOMM Copyright (c) 2008 Apple Inc. +XCOMM +XCOMM Permission is hereby granted, free of charge, to any person +XCOMM obtaining a copy of this software and associated documentation files +XCOMM (the "Software"), to deal in the Software without restriction, +XCOMM including without limitation the rights to use, copy, modify, merge, +XCOMM publish, distribute, sublicense, and/or sell copies of the Software, +XCOMM and to permit persons to whom the Software is furnished to do so, +XCOMM subject to the following conditions: +XCOMM +XCOMM The above copyright notice and this permission notice shall be +XCOMM included in all copies or substantial portions of the Software. +XCOMM +XCOMM THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +XCOMM EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +XCOMM MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +XCOMM NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT +XCOMM HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +XCOMM WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +XCOMM OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +XCOMM DEALINGS IN THE SOFTWARE. +XCOMM +XCOMM Except as contained in this notice, the name(s) of the above +XCOMM copyright holders shall not be used in advertising or otherwise to +XCOMM promote the sale, use or other dealings in this Software without +XCOMM prior written authorization. + +if [ -x BINDIR/font_cache ] ; then + BINDIR/font_cache & +elif [ -x BINDIR/font_cache.sh ] ; then + BINDIR/font_cache.sh -s & +elif [ -x /usr/X11/bin/fc-cache ] ; then + BINDIR/fc-cache & +fi diff --git a/app/xinit/privileged_startx/Makefile.am b/app/xinit/privileged_startx/Makefile.am new file mode 100644 index 000000000..6a143ca18 --- /dev/null +++ b/app/xinit/privileged_startx/Makefile.am @@ -0,0 +1,74 @@ +# Copyright (c) 2008 Apple Inc. +# +# 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 ABOVE LISTED COPYRIGHT +# HOLDER(S) 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(s) of the above +# copyright holders shall not be used in advertising or otherwise to +# promote the sale, use or other dealings in this Software without +# prior written authorization. + +include $(top_srcdir)/cpprules.in + +xinitrcdir = $(libdir)/X11/xinit +privstartxdir = $(xinitrcdir)/privileged_startx.d + +xinitrc_PROGRAMS = privileged_startx +privstartx_SCRIPTS = 10-tmpdirs 20-font_cache + +AM_CPPFLAGS = -DXINITDIR=\"$(xinitrcdir)\" -DSCRIPTDIR=\"$(privstartxdir)\" -DBINDIR=\"$(bindir)\" + +CPP_FILES_FLAGS = -DXINITDIR="$(xinitrcdir)" -DSCRIPTDIR="$(privstartxdir)" -DBINDIR="$(bindir)" + +dist_privileged_startx_SOURCES = \ + server.c \ + client.c \ + privileged_startx.c + +nodist_privileged_startx_SOURCES = \ + privileged_startxServer.c \ + privileged_startxUser.c + +BUILT_SOURCES = \ + privileged_startxServer.c \ + privileged_startxUser.c \ + privileged_startxServer.h \ + privileged_startx.h + +launchdaemons_PRE = org.x.privileged_startx.plist.cpp +launchdaemons_DATA = $(launchdaemons_PRE:plist.cpp=plist) + +10-tmpdirs: 10-tmpdirs.cpp Makefile +20-font_cache: 20-font_cache.cpp Makefile + +CLEANFILES = \ + $(privstartx_SCRIPTS) \ + $(BUILT_SOURCES) \ + $(launchdaemons_DATA) + +EXTRA_DIST = \ + 10-tmpdirs.cpp \ + 20-font_cache.cpp \ + org.x.privileged_startx.plist.cpp \ + privileged_startx.defs \ + privileged_startx_types.h + +$(BUILT_SOURCES): privileged_startx.defs + mig -sheader privileged_startxServer.h privileged_startx.defs diff --git a/app/xinit/privileged_startx/Makefile.in b/app/xinit/privileged_startx/Makefile.in new file mode 100644 index 000000000..2b832c1e8 --- /dev/null +++ b/app/xinit/privileged_startx/Makefile.in @@ -0,0 +1,612 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Copyright (c) 2008 Apple Inc. +# +# 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 ABOVE LISTED COPYRIGHT +# HOLDER(S) 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(s) of the above +# copyright holders shall not be used in advertising or otherwise to +# promote the sale, use or other dealings in this Software without +# prior written authorization. + +# 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@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/cpprules.in +xinitrc_PROGRAMS = privileged_startx$(EXEEXT) +subdir = privileged_startx +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(xinitrcdir)" \ + "$(DESTDIR)$(privstartxdir)" "$(DESTDIR)$(launchdaemonsdir)" +xinitrcPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(xinitrc_PROGRAMS) +dist_privileged_startx_OBJECTS = server.$(OBJEXT) client.$(OBJEXT) \ + privileged_startx.$(OBJEXT) +nodist_privileged_startx_OBJECTS = privileged_startxServer.$(OBJEXT) \ + privileged_startxUser.$(OBJEXT) +privileged_startx_OBJECTS = $(dist_privileged_startx_OBJECTS) \ + $(nodist_privileged_startx_OBJECTS) +privileged_startx_LDADD = $(LDADD) +privstartxSCRIPT_INSTALL = $(INSTALL_SCRIPT) +SCRIPTS = $(privstartx_SCRIPTS) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(dist_privileged_startx_SOURCES) \ + $(nodist_privileged_startx_SOURCES) +DIST_SOURCES = $(dist_privileged_startx_SOURCES) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +launchdaemonsDATA_INSTALL = $(INSTALL_DATA) +DATA = $(launchdaemons_DATA) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +ARCHMANDEFS = @ARCHMANDEFS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +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@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +MCOOKIE = @MCOOKIE@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHELL_CMD = @SHELL_CMD@ +STARTX_COOKIE_FLAGS = @STARTX_COOKIE_FLAGS@ +STRIP = @STRIP@ +TWM = @TWM@ +VERSION = @VERSION@ +WM = @WM@ +XAUTH = @XAUTH@ +XCLOCK = @XCLOCK@ +XCONSOLE = @XCONSOLE@ +XINIT = @XINIT@ +XINIT_CFLAGS = @XINIT_CFLAGS@ +XINIT_LIBS = @XINIT_LIBS@ +XMODMAP = @XMODMAP@ +XRDB = @XRDB@ +XSERVER = @XSERVER@ +XTERM = @XTERM@ +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@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +launchagentsdir = @launchagentsdir@ +launchdaemonsdir = @launchdaemonsdir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +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 +xinitrcdir = $(libdir)/X11/xinit +privstartxdir = $(xinitrcdir)/privileged_startx.d +privstartx_SCRIPTS = 10-tmpdirs 20-font_cache +AM_CPPFLAGS = -DXINITDIR=\"$(xinitrcdir)\" -DSCRIPTDIR=\"$(privstartxdir)\" -DBINDIR=\"$(bindir)\" +CPP_FILES_FLAGS = -DXINITDIR="$(xinitrcdir)" -DSCRIPTDIR="$(privstartxdir)" -DBINDIR="$(bindir)" +dist_privileged_startx_SOURCES = \ + server.c \ + client.c \ + privileged_startx.c + +nodist_privileged_startx_SOURCES = \ + privileged_startxServer.c \ + privileged_startxUser.c + +BUILT_SOURCES = \ + privileged_startxServer.c \ + privileged_startxUser.c \ + privileged_startxServer.h \ + privileged_startx.h + +launchdaemons_PRE = org.x.privileged_startx.plist.cpp +launchdaemons_DATA = $(launchdaemons_PRE:plist.cpp=plist) +CLEANFILES = \ + $(privstartx_SCRIPTS) \ + $(BUILT_SOURCES) \ + $(launchdaemons_DATA) + +EXTRA_DIST = \ + 10-tmpdirs.cpp \ + 20-font_cache.cpp \ + org.x.privileged_startx.plist.cpp \ + privileged_startx.defs \ + privileged_startx_types.h + +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .$(APP_MAN_SUFFIX) .man .cpp .c .o .obj +$(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*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu privileged_startx/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu privileged_startx/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-xinitrcPROGRAMS: $(xinitrc_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(xinitrcdir)" || $(mkdir_p) "$(DESTDIR)$(xinitrcdir)" + @list='$(xinitrc_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(xinitrcPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(xinitrcdir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(xinitrcPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(xinitrcdir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-xinitrcPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(xinitrc_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(xinitrcdir)/$$f'"; \ + rm -f "$(DESTDIR)$(xinitrcdir)/$$f"; \ + done + +clean-xinitrcPROGRAMS: + -test -z "$(xinitrc_PROGRAMS)" || rm -f $(xinitrc_PROGRAMS) +privileged_startx$(EXEEXT): $(privileged_startx_OBJECTS) $(privileged_startx_DEPENDENCIES) + @rm -f privileged_startx$(EXEEXT) + $(LINK) $(privileged_startx_LDFLAGS) $(privileged_startx_OBJECTS) $(privileged_startx_LDADD) $(LIBS) +install-privstartxSCRIPTS: $(privstartx_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(privstartxdir)" || $(mkdir_p) "$(DESTDIR)$(privstartxdir)" + @list='$(privstartx_SCRIPTS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f $$d$$p; then \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " $(privstartxSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(privstartxdir)/$$f'"; \ + $(privstartxSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(privstartxdir)/$$f"; \ + else :; fi; \ + done + +uninstall-privstartxSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(privstartx_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f '$(DESTDIR)$(privstartxdir)/$$f'"; \ + rm -f "$(DESTDIR)$(privstartxdir)/$$f"; \ + done + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/privileged_startx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/privileged_startxServer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/privileged_startxUser.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/server.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +uninstall-info-am: +install-launchdaemonsDATA: $(launchdaemons_DATA) + @$(NORMAL_INSTALL) + test -z "$(launchdaemonsdir)" || $(mkdir_p) "$(DESTDIR)$(launchdaemonsdir)" + @list='$(launchdaemons_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(launchdaemonsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(launchdaemonsdir)/$$f'"; \ + $(launchdaemonsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(launchdaemonsdir)/$$f"; \ + done + +uninstall-launchdaemonsDATA: + @$(NORMAL_UNINSTALL) + @list='$(launchdaemons_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(launchdaemonsdir)/$$f'"; \ + rm -f "$(DESTDIR)$(launchdaemonsdir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(mkdir_p) $(distdir)/.. + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(xinitrcdir)" "$(DESTDIR)$(privstartxdir)" "$(DESTDIR)$(launchdaemonsdir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-generic clean-xinitrcPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-launchdaemonsDATA install-privstartxSCRIPTS \ + install-xinitrcPROGRAMS + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am uninstall-launchdaemonsDATA \ + uninstall-privstartxSCRIPTS uninstall-xinitrcPROGRAMS + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-xinitrcPROGRAMS ctags distclean distclean-compile \ + distclean-generic distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-launchdaemonsDATA install-man \ + install-privstartxSCRIPTS install-strip \ + install-xinitrcPROGRAMS 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-info-am \ + uninstall-launchdaemonsDATA uninstall-privstartxSCRIPTS \ + uninstall-xinitrcPROGRAMS + + +.cpp: + $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ + +.man.$(APP_MAN_SUFFIX): + $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ + +10-tmpdirs: 10-tmpdirs.cpp Makefile +20-font_cache: 20-font_cache.cpp Makefile + +$(BUILT_SOURCES): privileged_startx.defs + mig -sheader privileged_startxServer.h privileged_startx.defs +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/app/xinit/privileged_startx/client.c b/app/xinit/privileged_startx/client.c new file mode 100644 index 000000000..2a24a7086 --- /dev/null +++ b/app/xinit/privileged_startx/client.c @@ -0,0 +1,56 @@ +/* Copyright (c) 2008 Apple Inc. + * + * 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 ABOVE LISTED COPYRIGHT + * HOLDER(S) 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(s) of the above + * copyright holders shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization. + */ + +#include <mach/mach.h> +#include <mach/mach_error.h> +#include <servers/bootstrap.h> +#include <unistd.h> +#include <stdio.h> +#include <stdlib.h> +#include <stdbool.h> + +#include "privileged_startx.h" + +int client_main(void) { + kern_return_t kr; + mach_port_t mp; + + kr = bootstrap_look_up(bootstrap_port, BOOTSTRAP_NAME, &mp); + if (kr != KERN_SUCCESS) { + fprintf(stderr, "bootstrap_look_up(): %s\n", bootstrap_strerror(kr)); + exit(EXIT_FAILURE); + } + + kr = privileged_startx(mp); + if (kr != KERN_SUCCESS) { + fprintf(stderr, "privileged_startx client: %s\n", mach_error_string(kr)); + exit(EXIT_FAILURE); + } + + exit(EXIT_SUCCESS); +} diff --git a/app/xinit/privileged_startx/org.x.privileged_startx.plist.cpp b/app/xinit/privileged_startx/org.x.privileged_startx.plist.cpp new file mode 100644 index 000000000..e878dc3e3 --- /dev/null +++ b/app/xinit/privileged_startx/org.x.privileged_startx.plist.cpp @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//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.privileged_startx</string> + <key>MachServices</key> + <dict> + <key>org.x.privileged_startx</key> + <true/> + </dict> + <key>ProgramArguments</key> + <array> + <string>XINITDIR/privileged_startx</string> + <string>-d</string> + <string>SCRIPTDIR</string> + </array> + <key>TimeOut</key> + <integer>60</integer> +</dict> +</plist> diff --git a/app/xinit/privileged_startx/privileged_startx.c b/app/xinit/privileged_startx/privileged_startx.c new file mode 100644 index 000000000..725a1b0a7 --- /dev/null +++ b/app/xinit/privileged_startx/privileged_startx.c @@ -0,0 +1,59 @@ +/* Copyright (c) 2008 Apple Inc. + * + * 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 ABOVE LISTED COPYRIGHT + * HOLDER(S) 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(s) of the above + * copyright holders shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization. + */ + +#include <string.h> +#include <stdio.h> + +#ifndef SCRIPTDIR +#define SCRIPTDIR="/usr/X11/lib/X11/xinit/privileged_startx.d" +#endif + +static void usage(const char *prog) { + fprintf(stderr, "%s: usage\n", prog); + fprintf(stderr, " %s [-d [<script dir>]]\n\n", prog); + fprintf(stderr, " -d: Passed when called from launchd to denote server-mode.\n"); + fprintf(stderr, " <script dir>: Directory to use instead of %s\n", SCRIPTDIR); +} + +int client_main(void); +int server_main(const char *dir); + +int main(int argc, char *argv[]) { + + if(argc == 1) { + return client_main(); + } else if(!strncmp(argv[1], "-d", 2)) { + if(argc == 2) + return server_main(NULL); + else if(argc == 3) + return server_main(argv[2]); + } + + usage(argv[0]); + return 1; +} diff --git a/app/xinit/privileged_startx/privileged_startx.defs b/app/xinit/privileged_startx/privileged_startx.defs new file mode 100644 index 000000000..86f2b3a06 --- /dev/null +++ b/app/xinit/privileged_startx/privileged_startx.defs @@ -0,0 +1,40 @@ +/* Copyright (c) 2008 Apple Inc. + * + * 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 ABOVE LISTED COPYRIGHT + * HOLDER(S) 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(s) of the above + * copyright holders shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization. + */ + +#include <mach/std_types.defs> +#include <mach/mach_types.defs> +import "privileged_startx_types.h"; + +subsystem privileged_startx 12345; +serverprefix do_; + +routine privileged_startx( + port : mach_port_t); + +routine idle_exit( + port : mach_port_t); diff --git a/app/xinit/privileged_startx/privileged_startx_types.h b/app/xinit/privileged_startx/privileged_startx_types.h new file mode 100644 index 000000000..fef71953d --- /dev/null +++ b/app/xinit/privileged_startx/privileged_startx_types.h @@ -0,0 +1,6 @@ +#ifndef _PRIV_STARTX_TYPES_H_ +#define _PRIV_STARTX_TYPES_H_ + +#define BOOTSTRAP_NAME "org.x.privileged_startx" + +#endif diff --git a/app/xinit/privileged_startx/server.c b/app/xinit/privileged_startx/server.c new file mode 100644 index 000000000..7afd42418 --- /dev/null +++ b/app/xinit/privileged_startx/server.c @@ -0,0 +1,250 @@ +/* Copyright (c) 2008 Apple Inc. + * + * 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 ABOVE LISTED COPYRIGHT + * HOLDER(S) 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(s) of the above + * copyright holders shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization. + */ + +#include <mach/mach.h> +#include <mach/mach_error.h> +#include <servers/bootstrap.h> +#include <unistd.h> +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fts.h> +#include <limits.h> +#include <stdlib.h> +#include <stdbool.h> +#include <sys/time.h> +#include <launch.h> +#include <asl.h> +#include <pthread.h> +#include <errno.h> + +#include "privileged_startx.h" +#include "privileged_startxServer.h" + +union MaxMsgSize { + union __RequestUnion__privileged_startx_subsystem req; + union __ReplyUnion__privileged_startx_subsystem rep; +}; + +/* globals to trigger idle exit */ +#define DEFAULT_IDLE_TIMEOUT 60 /* 60 second timeout, then the server exits */ + +struct idle_globals { + mach_port_t mp; + long timeout; + struct timeval lastmsg; +}; + +struct idle_globals idle_globals; + +#ifndef SCRIPTDIR +#define SCRIPTDIR="/usr/X11/lib/X11/xinit/privileged_startx.d" +#endif + +/* Default script dir */ +const char *script_dir = SCRIPTDIR; + +static void* idle_thread(void* param __attribute__((unused))); + +int server_main(const char *dir) { + mach_msg_size_t mxmsgsz = sizeof(union MaxMsgSize) + MAX_TRAILER_SIZE; + mach_port_t mp; + kern_return_t kr; + long idle_timeout = DEFAULT_IDLE_TIMEOUT; + + launch_data_t config = NULL, checkin = NULL; + checkin = launch_data_new_string(LAUNCH_KEY_CHECKIN); + config = launch_msg(checkin); + if (!config || launch_data_get_type(config) == LAUNCH_DATA_ERRNO) { + asl_log(NULL, NULL, ASL_LEVEL_ERR, "launchd checkin failed"); + exit(EXIT_FAILURE); + } + + launch_data_t tmv; + tmv = launch_data_dict_lookup(config, LAUNCH_JOBKEY_TIMEOUT); + if (tmv) { + idle_timeout = launch_data_get_integer(tmv); + asl_log(NULL, NULL, ASL_LEVEL_DEBUG, + "idle timeout set: %ld seconds", idle_timeout); + } + + if(dir) { + script_dir = dir; + asl_log(NULL, NULL, ASL_LEVEL_DEBUG, + "script directory set: %s", script_dir); + } + + launch_data_t svc; + svc = launch_data_dict_lookup(config, LAUNCH_JOBKEY_MACHSERVICES); + if (!svc) { + asl_log(NULL, NULL, ASL_LEVEL_ERR, "no mach services"); + exit(EXIT_FAILURE); + } + + svc = launch_data_dict_lookup(svc, BOOTSTRAP_NAME); + if (!svc) { + asl_log(NULL, NULL, ASL_LEVEL_ERR, "no mach service: %s", + BOOTSTRAP_NAME); + exit(EXIT_FAILURE); + } + + mp = launch_data_get_machport(svc); + if (mp == MACH_PORT_NULL) { + asl_log(NULL, NULL, ASL_LEVEL_ERR, "NULL mach service: %s", + BOOTSTRAP_NAME); + exit(EXIT_FAILURE); + } + + /* insert a send right so we can send our idle exit message */ + kr = mach_port_insert_right(mach_task_self(), mp, mp, + MACH_MSG_TYPE_MAKE_SEND); + if (kr != KERN_SUCCESS) { + asl_log(NULL, NULL, ASL_LEVEL_ERR, "send right failed: %s", + mach_error_string(kr)); + exit(EXIT_FAILURE); + } + + /* spawn a thread to monitor our idle timeout */ + pthread_t thread; + idle_globals.mp = mp; + idle_globals.timeout = idle_timeout; + gettimeofday(&idle_globals.lastmsg, NULL); + pthread_create(&thread, NULL, &idle_thread, NULL); + + /* Main event loop */ + kr = mach_msg_server(privileged_startx_server, mxmsgsz, mp, 0); + if (kr != KERN_SUCCESS) { + asl_log(NULL, NULL, ASL_LEVEL_ERR, + "mach_msg_server(mp): %s\n", mach_error_string(kr)); + exit(EXIT_FAILURE); + } + + exit(EXIT_SUCCESS); +} + +static int ftscmp(const FTSENT **a, const FTSENT **b) { + return strcmp((**a).fts_name, (**b).fts_name); +} + +kern_return_t do_privileged_startx(mach_port_t test_port __attribute__((unused))) { + kern_return_t retval = KERN_SUCCESS; + char fn_buf[PATH_MAX + 1]; + char *s; + int error_code; + FTS *ftsp; + FTSENT *ftsent; + + const char * path_argv[2] = {script_dir, NULL}; + + /* Store that we were called, so the idle timer will reset */ + gettimeofday(&idle_globals.lastmsg, NULL); + + /* script_dir contains a set of files to run with root privs when X11 starts */ + ftsp = fts_open(path_argv, FTS_PHYSICAL, ftscmp); + if(!ftsp) { + asl_log(NULL, NULL, ASL_LEVEL_ERR, + "do_privileged_startx: fts_open(%s): %s\n", + script_dir, strerror(errno)); + return KERN_FAILURE; + } + + /* Grab our dir */ + ftsent = fts_read(ftsp); + if(!ftsent) { + asl_log(NULL, NULL, ASL_LEVEL_ERR, + "do_privileged_startx: fts_read(): %s\n", strerror(errno)); + fts_close(ftsp); + return KERN_FAILURE; + } + + /* Get a list of the files in this directory */ + ftsent = fts_children(ftsp, 0); + if(!ftsent) { + asl_log(NULL, NULL, ASL_LEVEL_ERR, + "do_privileged_startx: fts_children(): %s\n", strerror(errno)); + fts_close(ftsp); + return KERN_FAILURE; + } + + /* Setup the buffer to have the path to the script dir */ + strncpy(fn_buf, script_dir, PATH_MAX-1); + strcat(fn_buf, "/"); + s = strrchr(fn_buf, 0); + + /* Itterate over these files in alphabetical order */ + for(; ftsent; ftsent = ftsent->fts_link) { + /* We only source regular files that are executable */ + /* Note: This assumes we own them, which should always be the case */ + if((ftsent->fts_statp->st_mode & S_IFREG) && + (ftsent->fts_statp->st_mode & S_IXUSR)) { + + /* Complete the full path filename in fn_buf */ + strcpy(s, ftsent->fts_name); + + /* Run it */ + error_code = system(fn_buf); + if(error_code != 0) { + asl_log(NULL, NULL, ASL_LEVEL_ERR, + "do_privileged_startx: %s: exited with status %d\n", + fn_buf, error_code); + retval = KERN_FAILURE; + } + } + } + + fts_close(ftsp); + return retval; +} + +kern_return_t do_idle_exit(mach_port_t test_port __attribute__((unused))) { + struct timeval now; + gettimeofday(&now, NULL); + + long delta = now.tv_sec - idle_globals.lastmsg.tv_sec; + if (delta >= idle_globals.timeout) { + exit(EXIT_SUCCESS); + } + + return KERN_SUCCESS; +} + +static void *idle_thread(void* param __attribute__((unused))) { + for(;;) { + struct timeval now; + gettimeofday(&now, NULL); + long delta = (now.tv_sec - idle_globals.lastmsg.tv_sec); + if (delta < idle_globals.timeout) { + /* sleep for remainder of timeout */ + sleep(idle_globals.timeout - delta); + } else { + /* timeout has elapsed, attempt to idle exit */ + idle_exit(idle_globals.mp); + } + } + return NULL; +} diff --git a/app/xinit/startx.cpp b/app/xinit/startx.cpp index c31fd7ff4..8ffdc70ab 100644 --- a/app/xinit/startx.cpp +++ b/app/xinit/startx.cpp @@ -13,6 +13,9 @@ XCOMM Site administrators are STRONGLY urged to write nicer versions. XCOMM XCOMM $XFree86: xc/programs/xinit/startx.cpp,v 3.16tsi Exp $ +unset DBUS_SESSION_BUS_ADDRESS +unset SESSION_MANAGER + #if defined(__SCO__) || defined(__UNIXWARE__) || defined(__APPLE__) XCOMM Check for /usr/bin/X11 and BINDIR in the path, if not add them. @@ -75,6 +78,7 @@ defaultclient=XTERM defaultserver=XSERVER defaultclientargs="" defaultserverargs="" +defaultdisplay=":0" clientargs="" serverargs="" @@ -95,13 +99,21 @@ 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 + if [ -x /usr/X11/bin/font_cache ] ; then + /usr/X11/bin/font_cache & + elif [ -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 XINITDIR/privileged_startx ] ; then + # Don't push this into the background becasue it can cause + # a race to create /tmp/.X11-unix + XINITDIR/privileged_startx +fi + if [ x`defaults read org.x.X11 no_auth` = x0 ] ; then enable_xauth=1 else @@ -149,12 +161,6 @@ case $1 in esac #endif -if [ -f $userserverrc ]; then - defaultserverargs=$userserverrc -elif [ -f $sysserverrc ]; then - defaultserverargs=$sysserverrc -fi - whoseargs="client" while [ x"$1" != x ]; do case "$1" in @@ -206,14 +212,19 @@ fi XCOMM process server arguments if [ x"$server" = x ]; then - XCOMM if no server arguments or display either, use rc file instead + server=$defaultserver + + XCOMM if no server arguments or display either, use defaults if [ x"$serverargs" = x -a x"$display" = x ]; then - server="$defaultserverargs" -#ifdef __APPLE__ - display="$defaultdisplay" -#endif - else - server=$defaultserver + XCOMM For compatibility reasons, only use xserverrc if there were no server command line arguments + if [ -f $userserverrc ]; then + server=$userserverrc + elif [ -f $sysserverrc ]; then + server=$sysserverrc + fi + + serverargs=$defaultserverargs + display=$defaultdisplay fi fi @@ -243,12 +254,16 @@ if [ x"$enable_xauth" = x1 ] ; then #if defined(HAS_COOKIE_MAKER) && defined(MK_COOKIE) mcookie=`MK_COOKIE` #else - mcookie=`dd if=/dev/random bs=16 count=1 2>/dev/null | hexdump -e \\"%08x\\"` + if [ -r /dev/urandom ]; then + mcookie=`dd if=/dev/urandom bs=16 count=1 2>/dev/null | hexdump -e \\"%08x\\"` + else + mcookie=`dd if=/dev/random bs=16 count=1 2>/dev/null | hexdump -e \\"%08x\\"` + fi +#endif if test x"$mcookie" = x; then echo "Couldn't create cookie" exit 1 fi -#endif dummy=0 XCOMM create a file with auth information for the server. ':0' is a dummy. diff --git a/app/xinit/xinit.c b/app/xinit/xinit.c index bdd739690..73f2cad6d 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.5 2008/04/20 13:46:02 matthieu Exp $ */ +/* $OpenBSD: xinit.c,v 1.6 2008/06/18 20:31:51 matthieu Exp $ */ /* @@ -40,12 +40,6 @@ 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> @@ -177,9 +171,6 @@ 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) || defined(__APPLE__) int status; @@ -229,56 +220,11 @@ sigUsr1(int sig) #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) { - 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); + Execvpe (vec[0], vec, envp); #ifndef __UNIXOS2__ if (access (vec[0], R_OK) == 0) { vec--; /* back it up to stuff shell in */ @@ -306,10 +252,6 @@ 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 */ @@ -413,10 +355,11 @@ main(int argc, char *argv[], char *envp[]) xinitrcbuf[0] = '\0'; if ((cp = getenv ("XINITRC")) != NULL) { - strcpy (xinitrcbuf, cp); + (void) snprintf (xinitrcbuf, sizeof(xinitrcbuf), "%s", cp); required = True; } else if ((cp = getenv ("HOME")) != NULL) { - (void) sprintf (xinitrcbuf, "%s/%s", cp, XINITRC); + (void) snprintf (xinitrcbuf, sizeof(xinitrcbuf), + "%s/%s", cp, XINITRC); } if (xinitrcbuf[0]) { if (access (xinitrcbuf, F_OK) == 0) { @@ -440,10 +383,11 @@ main(int argc, char *argv[], char *envp[]) xserverrcbuf[0] = '\0'; if ((cp = getenv ("XSERVERRC")) != NULL) { - strcpy (xserverrcbuf, cp); + (void) snprintf (xserverrcbuf, sizeof(xserverrcbuf), "%s", cp); required = True; } else if ((cp = getenv ("HOME")) != NULL) { - (void) sprintf (xserverrcbuf, "%s/%s", cp, XSERVERRC); + (void) snprintf (xserverrcbuf, sizeof(xserverrcbuf), + "%s/%s", cp, XSERVERRC); } if (xserverrcbuf[0]) { if (access (xserverrcbuf, F_OK) == 0) { @@ -706,6 +650,7 @@ setWindowPath(void) unsigned long num; char nums[10]; int numn; + size_t len; prop = XInternAtom(xd, "XFree86_VT", False); if (prop == None) { #ifdef DEBUG @@ -761,11 +706,18 @@ setWindowPath(void) windowpath = getenv("WINDOWPATH"); numn = snprintf(nums, sizeof(nums), "%lu", num); if (!windowpath) { - newwindowpath = malloc(10 + 1 + numn + 1); - sprintf(newwindowpath, "WINDOWPATH=%s", nums); + len = 10 + 1 + numn + 1; + newwindowpath = malloc(len); + if (newwindowpath == NULL) + return; + snprintf(newwindowpath, len, "WINDOWPATH=%s", nums); } else { - newwindowpath = malloc(10 + 1 + strlen(windowpath) + 1 + numn + 1); - sprintf(newwindowpath, "WINDOWPATH=%s:%s", windowpath, nums); + len = 10 + 1 + strlen(windowpath) + 1 + numn + 1; + newwindowpath = malloc(len); + if (newwindowpath == NULL) + return; + snprintf(newwindowpath, len, "WINDOWPATH=%s:%s", + windowpath, nums); } *newenvironlast++ = newwindowpath; *newenvironlast = NULL; @@ -888,8 +840,7 @@ set_environment(void) } /* put DISPLAY=displayname as first element */ - strcpy (displaybuf, "DISPLAY="); - strcpy (displaybuf + 8, displayNum); + snprintf (displaybuf, sizeof(displaybuf), "DISPLAY=%s", displayNum); newPtr = newenviron; *newPtr++ = displaybuf; diff --git a/app/xinit/xinitrc.cpp b/app/xinit/xinitrc.cpp index d9be5cb8b..2bc1dd60f 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.3 2008/04/20 13:46:02 matthieu Exp $ +XCOMM $OpenBSD: xinitrc.cpp,v 1.4 2008/06/18 20:31:51 matthieu Exp $ userresources=$HOME/.Xresources usermodmap=$HOME/.Xmodmap @@ -25,20 +25,20 @@ if [ -f $sysmodmap ]; then XMODMAP $sysmodmap fi -if [ -f $userresources ]; then +if [ -f "$userresources" ]; then #ifdef __APPLE__ if [ -x /usr/bin/cpp ] ; then - XRDB -merge $userresources + XRDB -merge "$userresources" else - XRDB -nocpp -merge $userresources + XRDB -nocpp -merge "$userresources" fi #else - XRDB -merge $userresources + XRDB -merge "$userresources" #endif fi -if [ -f $usermodmap ]; then - XMODMAP $usermodmap +if [ -f "$usermodmap" ]; then + XMODMAP "$usermodmap" fi XCOMM if we have private ssh key(s), start ssh-agent and add the key(s) |