diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2011-10-31 14:00:15 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2011-10-31 14:00:15 +0000 |
commit | aff0c2e23d1844c1376768334b9e089fefbe9389 (patch) | |
tree | 145280e4ea39e3f9cd8288592d3b340768fa1361 /app | |
parent | abafddd49ea3a71cf0bc0fb49d674fbf52da55d1 (diff) |
Update to xinit 1.3.1
Diffstat (limited to 'app')
-rw-r--r-- | app/xinit/ChangeLog | 289 | ||||
-rw-r--r-- | app/xinit/Makefile.am | 31 | ||||
-rw-r--r-- | app/xinit/Makefile.in | 118 | ||||
-rw-r--r-- | app/xinit/README | 26 | ||||
-rw-r--r-- | app/xinit/aclocal.m4 | 424 | ||||
-rw-r--r-- | app/xinit/config.h.in | 9 | ||||
-rw-r--r-- | app/xinit/configure | 1971 | ||||
-rw-r--r-- | app/xinit/configure.ac | 44 | ||||
-rw-r--r-- | app/xinit/cpprules.in | 22 | ||||
-rw-r--r-- | app/xinit/launchd/Makefile.am | 3 | ||||
-rw-r--r-- | app/xinit/launchd/Makefile.in | 500 | ||||
-rw-r--r-- | app/xinit/launchd/console_redirect.c | 418 | ||||
-rw-r--r-- | app/xinit/launchd/console_redirect.h | 44 | ||||
-rw-r--r-- | app/xinit/launchd/privileged_startx/10-tmpdirs.cpp (renamed from app/xinit/privileged_startx/10-tmpdirs.cpp) | 15 | ||||
-rw-r--r-- | app/xinit/launchd/privileged_startx/20-font_cache.cpp (renamed from app/xinit/privileged_startx/20-font_cache.cpp) | 0 | ||||
-rw-r--r-- | app/xinit/launchd/privileged_startx/Makefile.am (renamed from app/xinit/privileged_startx/Makefile.am) | 14 | ||||
-rw-r--r-- | app/xinit/launchd/privileged_startx/Makefile.in (renamed from app/xinit/privileged_startx/Makefile.in) | 78 | ||||
-rw-r--r-- | app/xinit/launchd/privileged_startx/client.c (renamed from app/xinit/privileged_startx/client.c) | 4 | ||||
-rw-r--r-- | app/xinit/launchd/privileged_startx/privileged_startx.c (renamed from app/xinit/privileged_startx/privileged_startx.c) | 4 | ||||
-rw-r--r-- | app/xinit/launchd/privileged_startx/privileged_startx.defs (renamed from app/xinit/privileged_startx/privileged_startx.defs) | 0 | ||||
-rw-r--r-- | app/xinit/launchd/privileged_startx/privileged_startx.plist.cpp (renamed from app/xinit/privileged_startx/org.x.privileged_startx.plist.cpp) | 4 | ||||
-rw-r--r-- | app/xinit/launchd/privileged_startx/privileged_startx_types.h (renamed from app/xinit/privileged_startx/privileged_startx_types.h) | 2 | ||||
-rw-r--r-- | app/xinit/launchd/privileged_startx/server.c (renamed from app/xinit/privileged_startx/server.c) | 38 | ||||
-rw-r--r-- | app/xinit/launchd/user_startx/Makefile.am | 49 | ||||
-rw-r--r-- | app/xinit/launchd/user_startx/Makefile.in | 568 | ||||
-rw-r--r-- | app/xinit/launchd/user_startx/launchd_startx.c | 64 | ||||
-rw-r--r-- | app/xinit/launchd/user_startx/startx.plist.cpp (renamed from app/xinit/org.x.startx.plist.cpp) | 5 | ||||
-rw-r--r-- | app/xinit/man/Makefile.am | 20 | ||||
-rw-r--r-- | app/xinit/man/Makefile.in | 389 | ||||
-rw-r--r-- | app/xinit/man/startx.man (renamed from app/xinit/startx.man) | 13 | ||||
-rw-r--r-- | app/xinit/man/xinit.man (renamed from app/xinit/xinit.man) | 0 | ||||
-rw-r--r-- | app/xinit/startx.cpp | 8 | ||||
-rw-r--r-- | app/xinit/xinit.c | 5 |
33 files changed, 3271 insertions, 1908 deletions
diff --git a/app/xinit/ChangeLog b/app/xinit/ChangeLog index 47e3a86c7..23f722835 100644 --- a/app/xinit/ChangeLog +++ b/app/xinit/ChangeLog @@ -1,3 +1,292 @@ +commit 6543a881708a2a410b51bb5644d9123c847a2908 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sun Jul 24 17:15:10 2011 -0700 + + configure.ac: Bump version to 1.3.1 + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit b0b9c21b752faab43241665f8fd12e10973e739c +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Fri Jun 17 13:49:11 2011 -0400 + + DIST_SUBDIRS is not required when using AM_CONDITIONALs + + LAUNCHD is an Automake conditional which means that Automake will + traverse the launchd directory when running the dist target. + http://www.gnu.org/software/automake/manual/automake.html + + One less variables to maintain. + + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit 120a58116f2e3a223dbb78e0b33d3755eeb8ad5a +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Fri Jun 17 13:39:27 2011 -0400 + + Move man pages in the man directory + + Now that the cpp tool is no longer needed, normalize the man pages build. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit a81fab654085239ffcc4981b6bdab9fc18ec3d08 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Fri Jun 17 11:15:12 2011 -0400 + + Use XORG_MANPAGE_SECTIONS rather than cpprules.in to build man pages + + As for all other manpages, use sed rather than the C preprocessor + from the Imake days. + + Use SCOMAN Automake variable and groff .if for conditional text + We can therefore remove ARCHMANDEFS + Remove man page related code from cpprules.in + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit 8e6cc68283518bba2820ff0d919aee9d49e3eb59 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat May 14 14:11:13 2011 -0700 + + launchd: Fix an array-index-out-of-bounds crasher + + Found-by: GuardMalloc + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 3b53d7aecb2f3a729c57f2831a3d4b6e1ff1901f +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu May 12 20:27:55 2011 -0700 + + launchd: Update console redirection to work with libdispatch + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit e6187b0d47722ec364372926d78dfe4e5637bd6c +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Thu May 12 20:08:09 2011 -0700 + + launchd Set the correct id for privileged_startx + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit a8de1219942e78db2cd193ffe745535d3c2d84b0 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed May 11 17:29:25 2011 -0700 + + configure.ac: Fix support for the deprecated --with-launchd-id-prefix + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 2771fbf28d6ee6cce09df0f245322d60e21795af +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed May 11 00:32:51 2011 -0700 + + launchd: syslog: Use facility org.x rather than user + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 4ca120d2d2a73d8a1595f15e04fc365a4ae20e78 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed May 11 00:29:03 2011 -0700 + + launchd: include config.h + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit c8b40e87f69f5be881725388418d703116af8e5f +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed May 11 00:24:45 2011 -0700 + + Rename launchd-id-prefix to bundle-id-prefix + + It's used many other places than just for launchd. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 50f1172349dc900da4016c243734ae50691eab6c +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Apr 27 18:10:45 2011 -0700 + + launchd: Silence clang static analyzer + + ../console_redirect.c:67:5: warning: Value stored to 'n' is never read + n = kevent(kq, ev, 2, NULL, 0, NULL); + ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 1 warning generated. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 2f15ccc30479d98012e3ddd595fa13c2f58d4a87 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Apr 27 18:08:50 2011 -0700 + + privileged_startx: Prefer /usr/bin/mktemp + + This will avoid accidentally tripping over an incompatible, + user-provided GNU flavor mktemp. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 4d0f9d2290bde45c0e844ce40f1caa7fb4baae0f +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Apr 26 23:15:13 2011 -0700 + + launchd: Brownbag fix string compare + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 933f0b2980b375cadc58b2ef5669bc34475a7be6 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Apr 26 13:34:57 2011 -0700 + + launchd: console_redirect: Actually read and log the remaining data when we get EV_EOF + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 0881b1f2082b26995c24212e1e54ac4391d23fcd +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Apr 26 13:04:21 2011 -0700 + + launchd: Remove dead EXTRA_DIST + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 2dd7a4b5ac19c0b2be5cc078756d43e42f39231c +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Apr 26 13:01:24 2011 -0700 + + launchd: Fix make dist + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 5f5390886004f785b4338fcff27f287c9aa6cd8c +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Mon Apr 25 23:09:03 2011 -0700 + + launchd: Enable stdout/stderr redirection to ASL + + Don't rely on launchd to do our logging for us. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + Reviewed-by: Daniel A. Steffen <dsteffen@apple.com> + +commit c6a7f895c8c90b85ed4fd08927c47b0d17ed067a +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Mon Apr 25 22:26:02 2011 -0700 + + launchd: Log messages to ASL rather than fprintf + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 567f59d3f8189b92bc46e2af1260f9340f462bdb +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Mon Apr 25 22:17:25 2011 -0700 + + launchd: Reorganized layout of launchd sources + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 75a969b884296439fb84ca2be8f77d718d7da1e6 +Author: Cyril Brulebois <kibi@debian.org> +Date: Sun Mar 6 01:59:13 2011 +0100 + + Fix minor typos in startx's comments. + + Signed-off-by: Cyril Brulebois <kibi@debian.org> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 2d88aba7a84d153c2fc3226eece751395990edc7 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Jan 28 18:50:20 2011 -0800 + + Merge adjacent if (timeout) blocks + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Dirk Wallenstein <halsmit@t-online.de> + +commit 622a5500e8b19d603592bb1e871633323a3c09da +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu Jan 13 11:15:47 2011 -0500 + + man: remove trailing spaces and tabs + + Using s/[ \t]*$// + + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit 7119d9109ac7fc85b8e97af83aa6d98f9941a998 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Wed Jan 12 15:33:42 2011 -0500 + + config: remove the workaround for the deprecated AC_HELP_STRING + + With Autoconf version 2.60, AS_HELP_STRING is always available. + + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit f4d2e3972e8f1c14cefa649e2da9bb83a06363c6 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Wed Jan 12 15:12:08 2011 -0500 + + config: remove unrequired AC_SUBST([*_LIBS]) + + This macro is called by PKG_CHECK_MODULES + + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit 7264d4132b8520069f6f8855cc3847805057d39b +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Wed Jan 12 13:33:48 2011 -0500 + + config: remove unrequired AC_SUBST([*_CFLAGS]) + + This macro is called by PKG_CHECK_MODULES + + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit b2b1cc02fdb141cae7ee18034a6ab5d571b7eb6b +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Jan 7 19:21:20 2011 -0800 + + config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS + + Regroup AC statements under the Autoconf initialization section. + Regroup AM statements under the Automake initialization section. + Add missing AC_CONFIG_SRCDIR + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit e6e427bbf6f3c9472dcbff1028fded459c803d6e +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Jan 7 19:19:22 2011 -0800 + + config: Replace obsolete usage of AC_OUTPUT with AC_CONFIG_FILES + + Stops configure from running the output generation routines twice + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 6e44c0f269a5f2dced84e7ab3c496605d827ec11 +Author: Tom Doherty <tom@singlesecond.com> +Date: Mon Nov 22 21:27:13 2010 +0100 + + Minor typo. + + Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit c371f43b69b223ba68e00125e6aa56621a23109b +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Oct 30 17:16:16 2010 -0700 + + Add usual set of URLs to README + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + commit cc92823c61f9f4d31a25d107017198d1e16d4fcf Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Oct 30 16:44:22 2010 -0700 diff --git a/app/xinit/Makefile.am b/app/xinit/Makefile.am index d0eac0796..7329b596c 100644 --- a/app/xinit/Makefile.am +++ b/app/xinit/Makefile.am @@ -19,6 +19,11 @@ # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. +SUBDIRS = man +if LAUNCHD +SUBDIRS += launchd +endif + bin_PROGRAMS = xinit bin_SCRIPTS = startx @@ -29,14 +34,6 @@ xinit_LDADD = $(XINIT_LIBS) xinit_SOURCES = \ xinit.c -appmandir = $(APP_MAN_DIR) - -appman_PRE = \ - startx.man \ - xinit.man - -appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) - include $(top_srcdir)/cpprules.in xinitrcdir = $(XINITDIR) @@ -58,26 +55,14 @@ CPP_FILES_FLAGS = \ -DSHELL_CMD=$(SHELL_CMD) $(STARTX_COOKIE_FLAGS) \ -D__libexecdir__="$(libexecdir)" \ -D__bindir__="$(bindir)" \ - -DLAUNCHD_ID_PREFIX="$(launchdidprefix)" - -if LAUNCHD -$(launchdidprefix).startx.plist.cpp: org.x.startx.plist.cpp - cp $< $@ - -launchagents_PRE = $(launchdidprefix).startx.plist.cpp -launchagents_DATA = $(launchagents_PRE:plist.cpp=plist) - -SUBDIRS = privileged_startx -endif - -DIST_SUBDIRS = privileged_startx + -DBUNDLE_ID_PREFIX="$(bundleidprefix)" xinitrc_DATA = xinitrc MAINTAINERCLEANFILES = ChangeLog INSTALL -CLEANFILES = xinitrc startx $(appman_DATA) $(launchagents_DATA) +CLEANFILES = xinitrc startx $(launchagents_DATA) -EXTRA_DIST = xinitrc.cpp startx.cpp org.x.startx.plist.cpp $(appman_PRE) \ +EXTRA_DIST = xinitrc.cpp startx.cpp \ autogen.sh .PHONY: ChangeLog INSTALL diff --git a/app/xinit/Makefile.in b/app/xinit/Makefile.in index cf10864f0..08d353c05 100644 --- a/app/xinit/Makefile.in +++ b/app/xinit/Makefile.in @@ -53,9 +53,9 @@ 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_sh_DATA = ${SHELL} $(install_sh) -c -m 644 +install_sh_PROGRAM = ${SHELL} $(install_sh) -c +install_sh_SCRIPT = ${SHELL} $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : @@ -66,6 +66,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +@LAUNCHD_TRUE@am__append_1 = launchd bin_PROGRAMS = xinit$(EXEEXT) DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ @@ -83,7 +84,6 @@ mkinstalldirs = $(SHELL) $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \ - "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(launchagentsdir)" \ "$(DESTDIR)$(xinitrcdir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) @@ -114,12 +114,11 @@ am__vpath_adj = case $$p in \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -appmanDATA_INSTALL = $(INSTALL_DATA) -launchagentsDATA_INSTALL = $(INSTALL_DATA) xinitrcDATA_INSTALL = $(INSTALL_DATA) -DATA = $(appman_DATA) $(launchagents_DATA) $(xinitrc_DATA) +DATA = $(xinitrc_DATA) ETAGS = etags CTAGS = ctags +DIST_SUBDIRS = man launchd DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -140,7 +139,6 @@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ -ARCHMANDEFS = @ARCHMANDEFS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -198,11 +196,13 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ +SCOMAN = @SCOMAN@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHELL_CMD = @SHELL_CMD@ STARTX_COOKIE_FLAGS = @STARTX_COOKIE_FLAGS@ +STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ TIGER_LAUNCHD_FALSE = @TIGER_LAUNCHD_FALSE@ TIGER_LAUNCHD_TRUE = @TIGER_LAUNCHD_TRUE@ @@ -238,6 +238,7 @@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +bundleidprefix = @bundleidprefix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -254,7 +255,6 @@ infodir = @infodir@ install_sh = @install_sh@ launchagentsdir = @launchagentsdir@ launchdaemonsdir = @launchdaemonsdir@ -launchdidprefix = @launchdidprefix@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ @@ -270,6 +270,7 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +SUBDIRS = man $(am__append_1) bin_SCRIPTS = startx AM_CFLAGS = $(CWARNFLAGS) $(XINIT_CFLAGS) AM_CPPFLAGS = -DXINITDIR=\"$(XINITDIR)\" -DBINDIR=\"$(bindir)\" @@ -277,12 +278,6 @@ xinit_LDADD = $(XINIT_LIBS) xinit_SOURCES = \ xinit.c -appmandir = $(APP_MAN_DIR) -appman_PRE = \ - startx.man \ - xinit.man - -appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ -e '/^\#line *[0-9][0-9]* *.*$$/d' \ -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ @@ -291,24 +286,7 @@ CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ -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__='$(XSERVERNAME)' \ - -D__XCONFIGFILE__='$(XCONFIGFILE)' \ - -D__XCONFIGFILEMAN__='$(XCONFIGFILEMAN)' \ - -D__xinitdir__=$(XINITDIR) \ - -D__bindir__=$(bindir) \ - -DSHELL_CMD=$(SHELL_CMD) $(ARCHMANDEFS) - -SUFFIXES = .$(APP_MAN_SUFFIX) .man .cpp +SUFFIXES = .cpp xinitrcdir = $(XINITDIR) PROGCPPDEFS = \ -DXRDB=@XRDB@ \ @@ -327,23 +305,19 @@ CPP_FILES_FLAGS = \ -DSHELL_CMD=$(SHELL_CMD) $(STARTX_COOKIE_FLAGS) \ -D__libexecdir__="$(libexecdir)" \ -D__bindir__="$(bindir)" \ - -DLAUNCHD_ID_PREFIX="$(launchdidprefix)" + -DBUNDLE_ID_PREFIX="$(bundleidprefix)" -@LAUNCHD_TRUE@launchagents_PRE = $(launchdidprefix).startx.plist.cpp -@LAUNCHD_TRUE@launchagents_DATA = $(launchagents_PRE:plist.cpp=plist) -@LAUNCHD_TRUE@SUBDIRS = privileged_startx -DIST_SUBDIRS = privileged_startx xinitrc_DATA = xinitrc MAINTAINERCLEANFILES = ChangeLog INSTALL -CLEANFILES = xinitrc startx $(appman_DATA) $(launchagents_DATA) -EXTRA_DIST = xinitrc.cpp startx.cpp org.x.startx.plist.cpp $(appman_PRE) \ +CLEANFILES = xinitrc startx $(launchagents_DATA) +EXTRA_DIST = xinitrc.cpp startx.cpp \ autogen.sh all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -.SUFFIXES: .$(APP_MAN_SUFFIX) .man .cpp .c .o .obj +.SUFFIXES: .cpp .c .o .obj am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/cpprules.in $(am__configure_deps) @@ -462,40 +436,6 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: -install-appmanDATA: $(appman_DATA) - @$(NORMAL_INSTALL) - test -z "$(appmandir)" || $(mkdir_p) "$(DESTDIR)$(appmandir)" - @list='$(appman_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(appmanDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appmandir)/$$f'"; \ - $(appmanDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appmandir)/$$f"; \ - done - -uninstall-appmanDATA: - @$(NORMAL_UNINSTALL) - @list='$(appman_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(appmandir)/$$f'"; \ - rm -f "$(DESTDIR)$(appmandir)/$$f"; \ - done -install-launchagentsDATA: $(launchagents_DATA) - @$(NORMAL_INSTALL) - test -z "$(launchagentsdir)" || $(mkdir_p) "$(DESTDIR)$(launchagentsdir)" - @list='$(launchagents_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(launchagentsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(launchagentsdir)/$$f'"; \ - $(launchagentsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(launchagentsdir)/$$f"; \ - done - -uninstall-launchagentsDATA: - @$(NORMAL_UNINSTALL) - @list='$(launchagents_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(launchagentsdir)/$$f'"; \ - rm -f "$(DESTDIR)$(launchagentsdir)/$$f"; \ - done install-xinitrcDATA: $(xinitrc_DATA) @$(NORMAL_INSTALL) test -z "$(xinitrcdir)" || $(mkdir_p) "$(DESTDIR)$(xinitrcdir)" @@ -795,7 +735,7 @@ check: check-recursive all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) config.h installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(launchagentsdir)" "$(DESTDIR)$(xinitrcdir)"; do \ + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(xinitrcdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive @@ -845,8 +785,7 @@ info: info-recursive info-am: -install-data-am: install-appmanDATA install-launchagentsDATA \ - install-xinitrcDATA +install-data-am: install-xinitrcDATA install-exec-am: install-binPROGRAMS install-binSCRIPTS @@ -875,9 +814,8 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \ - uninstall-binSCRIPTS uninstall-info-am \ - uninstall-launchagentsDATA uninstall-xinitrcDATA +uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-info-am uninstall-xinitrcDATA uninstall-info: uninstall-info-recursive @@ -888,29 +826,21 @@ uninstall-info: uninstall-info-recursive 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 install-am install-binPROGRAMS install-binSCRIPTS \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ install-xinitrcDATA installcheck installcheck-am installdirs \ 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 + uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-info-am \ + uninstall-xinitrcDATA .cpp: $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ -.man.$(APP_MAN_SUFFIX): - $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ - -@LAUNCHD_TRUE@$(launchdidprefix).startx.plist.cpp: org.x.startx.plist.cpp -@LAUNCHD_TRUE@ cp $< $@ - .PHONY: ChangeLog INSTALL INSTALL: diff --git a/app/xinit/README b/app/xinit/README index 9bbe2c94c..0d08e2827 100644 --- a/app/xinit/README +++ b/app/xinit/README @@ -1,5 +1,29 @@ +The xinit program is used to start the X Window System server and a first +client program on systems that are not using a display manager such as xdm. + The xinit is not intended for naive users. Instead, site administrators should design user-friendly scripts that present the desired interface when starting up X. The startx script is one such example. -Note that the sample xinitrc file is NOT installed by default. +All questions regarding this software should be directed at the +Xorg mailing list: + + http://lists.freedesktop.org/mailman/listinfo/xorg + +Please submit bug reports to the Xorg bugzilla: + + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +The master development code repository can be found at: + + git://anongit.freedesktop.org/git/xorg/app/xinit + + http://cgit.freedesktop.org/xorg/app/xinit + +For patch submission instructions, see: + + http://www.x.org/wiki/Development/Documentation/SubmittingPatches + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage diff --git a/app/xinit/aclocal.m4 b/app/xinit/aclocal.m4 index 3f71a4321..cdf4062b0 100644 --- a/app/xinit/aclocal.m4 +++ b/app/xinit/aclocal.m4 @@ -498,18 +498,6 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 8 - -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. -AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) - # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 @@ -1034,7 +1022,7 @@ dnl DEALINGS IN THE SOFTWARE. # See the "minimum version" comment for each macro you use to see what # version you require. m4_defun([XORG_MACROS_VERSION],[ -m4_define([vers_have], [1.11.0]) +m4_define([vers_have], [1.15.0]) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_if(m4_cmp(maj_have, maj_needed), 0,, @@ -1061,7 +1049,7 @@ AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], # which is not the best choice for supporting other OS'es, but covers most # of the ones we need for now. AC_MSG_CHECKING([if $RAWCPP requires -undef]) -AC_LANG_CONFTEST([Does cpp redefine unix ?]) +AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then AC_MSG_RESULT([no]) else @@ -1079,7 +1067,7 @@ fi rm -f conftest.$ac_ext AC_MSG_CHECKING([if $RAWCPP requires -traditional]) -AC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) +AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then AC_MSG_RESULT([no]) else @@ -1429,6 +1417,123 @@ AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) ]) # XORG_WITH_XMLTO +# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) +# -------------------------------------------- +# Minimum version: 1.12.0 +# Minimum version for optional DEFAULT argument: 1.12.0 +# +# XSLT (Extensible Stylesheet Language Transformations) is a declarative, +# XML-based language used for the transformation of XML documents. +# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. +# It is used under the cover by xmlto to generate html files from DocBook/XML. +# The XSLT processor is often used as a standalone tool for transformations. +# It should not be assumed that this tool is used only to work with documnetation. +# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. +# +# Interface to module: +# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation +# XSLTPROC: returns the path of the xsltproc program found +# returns the path set by the user in the environment +# --with-xsltproc: 'yes' user instructs the module to use xsltproc +# 'no' user instructs the module not to use xsltproc +# have_xsltproc: returns yes if xsltproc found in PATH or no +# +# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. +# +AC_DEFUN([XORG_WITH_XSLTPROC],[ +AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) +# Preserves the interface, should it be implemented later +m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) +m4_define([_defopt], m4_default([$2], [auto])) +AC_ARG_WITH(xsltproc, + AS_HELP_STRING([--with-xsltproc], + [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), + [use_xsltproc=$withval], [use_xsltproc=]_defopt) +m4_undefine([_defopt]) + +if test "x$use_xsltproc" = x"auto"; then + AC_PATH_PROG([XSLTPROC], [xsltproc]) + if test "x$XSLTPROC" = "x"; then + AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) + have_xsltproc=no + else + have_xsltproc=yes + fi +elif test "x$use_xsltproc" = x"yes" ; then + AC_PATH_PROG([XSLTPROC], [xsltproc]) + if test "x$XSLTPROC" = "x"; then + AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) + fi + have_xsltproc=yes +elif test "x$use_xsltproc" = x"no" ; then + if test "x$XSLTPROC" != "x"; then + AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) + fi + have_xsltproc=no +else + AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) +fi + +AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) +]) # XORG_WITH_XSLTPROC + +# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) +# ---------------------------------------- +# Minimum version: 1.15.0 +# +# PERL (Practical Extraction and Report Language) is a language optimized for +# scanning arbitrary text files, extracting information from those text files, +# and printing reports based on that information. +# +# When DEFAULT is not specified, --with-perl assumes 'auto'. +# +# Interface to module: +# HAVE_PERL: used in makefiles to conditionally scan text files +# PERL: returns the path of the perl program found +# returns the path set by the user in the environment +# --with-perl: 'yes' user instructs the module to use perl +# 'no' user instructs the module not to use perl +# have_perl: returns yes if perl found in PATH or no +# +# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. +# +AC_DEFUN([XORG_WITH_PERL],[ +AC_ARG_VAR([PERL], [Path to perl command]) +# Preserves the interface, should it be implemented later +m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) +m4_define([_defopt], m4_default([$2], [auto])) +AC_ARG_WITH(perl, + AS_HELP_STRING([--with-perl], + [Use perl for extracting information from files (default: ]_defopt[)]), + [use_perl=$withval], [use_perl=]_defopt) +m4_undefine([_defopt]) + +if test "x$use_perl" = x"auto"; then + AC_PATH_PROG([PERL], [perl]) + if test "x$PERL" = "x"; then + AC_MSG_WARN([perl not found - cannot extract information and report]) + have_perl=no + else + have_perl=yes + fi +elif test "x$use_perl" = x"yes" ; then + AC_PATH_PROG([PERL], [perl]) + if test "x$PERL" = "x"; then + AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) + fi + have_perl=yes +elif test "x$use_perl" = x"no" ; then + if test "x$PERL" != "x"; then + AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) + fi + have_perl=no +else + AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) +fi + +AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) +]) # XORG_WITH_PERL + # XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) # ---------------- # Minimum version: 1.5.0 @@ -1674,10 +1779,11 @@ AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) ]) # XORG_WITH_GROFF -# XORG_WITH_FOP([DEFAULT]) -# ---------------- +# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) +# --------------------------------------- # Minimum version: 1.6.0 # Minimum version for optional DEFAULT argument: 1.11.0 +# Minimum version for optional MIN-VERSION argument: 1.15.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the @@ -1697,7 +1803,7 @@ AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) # AC_DEFUN([XORG_WITH_FOP],[ AC_ARG_VAR([FOP], [Path to fop command]) -m4_define([_defopt], m4_default([$1], [auto])) +m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(fop, AS_HELP_STRING([--with-fop], [Use fop to regenerate documentation (default: ]_defopt[)]), @@ -1726,6 +1832,22 @@ elif test "x$use_fop" = x"no" ; then else AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) fi + +# Test for a minimum version of fop, if provided. +m4_ifval([$1], +[if test "$have_fop" = yes; then + # scrape the fop version + AC_MSG_CHECKING([for fop minimum version]) + fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` + AC_MSG_RESULT([$fop_version]) + AS_VERSION_COMPARE([$fop_version], [$1], + [if test "x$use_fop" = xauto; then + AC_MSG_WARN([fop version $fop_version found, but $1 needed]) + have_fop=no + else + AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) + fi]) +fi]) AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) ]) # XORG_WITH_FOP @@ -1808,12 +1930,12 @@ AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) # parm1: specify the default value, yes or no. # AC_DEFUN([XORG_ENABLE_DOCS],[ -m4_define([default], m4_default([$1], [yes])) +m4_define([docs_default], m4_default([$1], [yes])) AC_ARG_ENABLE(docs, AS_HELP_STRING([--enable-docs], - [Enable building the documentation (default: ]default[)]), - [build_docs=$enableval], [build_docs=]default) -m4_undefine([default]) + [Enable building the documentation (default: ]docs_default[)]), + [build_docs=$enableval], [build_docs=]docs_default) +m4_undefine([docs_default]) AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) AC_MSG_CHECKING([whether to build documentation]) AC_MSG_RESULT([$build_docs]) @@ -1885,6 +2007,194 @@ AC_MSG_CHECKING([whether to build functional specifications]) AC_MSG_RESULT([$build_specs]) ]) # XORG_ENABLE_SPECS +# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) +# ---------------------------------------------- +# Minimum version: 1.13.0 +# +# This macro enables a builder to enable/disable unit testing +# It makes no assumption about the test cases implementation +# Test cases may or may not use Automake "Support for test suites" +# They may or may not use the software utility library GLib +# +# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL +# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. +# The variable enable_unit_tests is used by other macros in this file. +# +# Interface to module: +# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests +# enable_unit_tests: used in configure.ac for additional configuration +# --enable-unit-tests: 'yes' user instructs the module to build tests +# 'no' user instructs the module not to build tests +# parm1: specify the default value, yes or no. +# +AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ +AC_BEFORE([$0], [XORG_WITH_GLIB]) +AC_BEFORE([$0], [XORG_LD_WRAP]) +m4_define([_defopt], m4_default([$1], [auto])) +AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], + [Enable building unit test cases (default: ]_defopt[)]), + [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) +m4_undefine([_defopt]) +AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) +AC_MSG_CHECKING([whether to build unit test cases]) +AC_MSG_RESULT([$enable_unit_tests]) +]) # XORG_ENABLE_UNIT_TESTS + +# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) +# ---------------------------------------- +# Minimum version: 1.13.0 +# +# GLib is a library which provides advanced data structures and functions. +# This macro enables a module to test for the presence of Glib. +# +# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. +# Otherwise the value of $enable_unit_tests is blank. +# +# Interface to module: +# HAVE_GLIB: used in makefiles to conditionally build targets +# with_glib: used in configure.ac to know if GLib has been found +# --with-glib: 'yes' user instructs the module to use glib +# 'no' user instructs the module not to use glib +# +AC_DEFUN([XORG_WITH_GLIB],[ +AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +m4_define([_defopt], m4_default([$2], [auto])) +AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], + [Use GLib library for unit testing (default: ]_defopt[)]), + [with_glib=$withval], [with_glib=]_defopt) +m4_undefine([_defopt]) + +have_glib=no +# Do not probe GLib if user explicitly disabled unit testing +if test "x$enable_unit_tests" != x"no"; then + # Do not probe GLib if user explicitly disabled it + if test "x$with_glib" != x"no"; then + m4_ifval( + [$1], + [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], + [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] + ) + fi +fi + +# Not having GLib when unit testing has been explicitly requested is an error +if test "x$enable_unit_tests" = x"yes"; then + if test "x$have_glib" = x"no"; then + AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) + fi +fi + +# Having unit testing disabled when GLib has been explicitly requested is an error +if test "x$enable_unit_tests" = x"no"; then + if test "x$with_glib" = x"yes"; then + AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) + fi +fi + +# Not having GLib when it has been explicitly requested is an error +if test "x$with_glib" = x"yes"; then + if test "x$have_glib" = x"no"; then + AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) + fi +fi + +AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) +]) # XORG_WITH_GLIB + +# XORG_LD_WRAP +# ------------ +# Minimum version: 1.13.0 +# +# Check if linker supports -wrap, passed via compiler flags +# +# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. +# Otherwise the value of $enable_unit_tests is blank. +# +AC_DEFUN([XORG_LD_WRAP],[ +XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no]) +# Not having ld wrap when unit testing has been explicitly requested is an error +if test "x$enable_unit_tests" = x"yes"; then + if test "x$have_ld_wrap" = x"no"; then + AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) + fi +fi +AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) +# +]) # XORG_LD_WRAP + +# XORG_CHECK_LINKER_FLAGS +# ----------------------- +# SYNOPSIS +# +# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE]) +# +# DESCRIPTION +# +# Check whether the given linker FLAGS work with the current language's +# linker, or whether they give an error. +# +# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on +# success/failure. +# +# NOTE: Based on AX_CHECK_COMPILER_FLAGS. +# +# LICENSE +# +# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> +# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> +# Copyright (c) 2009 Matteo Frigo +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see <http://www.gnu.org/licenses/>. +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well.# +AC_DEFUN([XORG_CHECK_LINKER_FLAGS], +[AC_MSG_CHECKING([whether the linker accepts $1]) +dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: +AS_LITERAL_IF([$1], + [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ + ax_save_FLAGS=$LDFLAGS + LDFLAGS="$1" + AC_LINK_IFELSE([AC_LANG_PROGRAM()], + AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, + AS_TR_SH(xorg_cv_linker_flags_[$1])=no) + LDFLAGS=$ax_save_FLAGS])], + [ax_save_FLAGS=$LDFLAGS + LDFLAGS="$1" + AC_LINK_IFELSE([AC_LANG_PROGRAM()], + eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, + eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) + LDFLAGS=$ax_save_FLAGS]) +eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) +AC_MSG_RESULT($xorg_check_linker_flags) +if test "x$xorg_check_linker_flags" = xyes; then + m4_default([$2], :) +else + m4_default([$3], :) +fi +]) # XORG_CHECK_LINKER_FLAGS + # XORG_CHECK_MALLOC_ZERO # ---------------------- # Minimum version: 1.0.0 @@ -1901,18 +2211,16 @@ AC_ARG_ENABLE(malloc0returnsnull, AC_MSG_CHECKING([whether malloc(0) returns NULL]) if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then - AC_RUN_IFELSE([ -char *malloc(); -char *realloc(); -char *calloc(); -main() { + AC_RUN_IFELSE([AC_LANG_PROGRAM([ +#include <stdlib.h> +],[ char *m0, *r0, *c0, *p; m0 = malloc(0); p = malloc(10); r0 = realloc(p,0); - c0 = calloc(0); - exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); -}], + c0 = calloc(0,10); + exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); +])], [MALLOC_ZERO_RETURNS_NULL=yes], [MALLOC_ZERO_RETURNS_NULL=no], [MALLOC_ZERO_RETURNS_NULL=yes]) @@ -2038,6 +2346,23 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) ]) # XORG_LINT_LIBRARY +# XORG_COMPILER_BRAND +# ------------------- +# Minimum version: 1.14.0 +# +# Checks for various brands of compilers and sets flags as appropriate: +# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" +# clang compiler - sets CLANGCC to "yes" +# Intel compiler - sets INTELCC to "yes" +# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" +# +AC_DEFUN([XORG_COMPILER_BRAND], [ +AC_REQUIRE([AC_PROG_CC_C99]) +AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) +AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) +AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) +]) # XORG_COMPILER_BRAND + # XORG_CWARNFLAGS # --------------- # Minimum version: 1.2.0 @@ -2046,6 +2371,7 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) # AC_DEFUN([XORG_CWARNFLAGS], [ AC_REQUIRE([AC_PROG_CC_C99]) +AC_REQUIRE([XORG_COMPILER_BRAND]) if test "x$GCC" = xyes ; then CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ -Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ @@ -2056,7 +2382,6 @@ if test "x$GCC" = xyes ; then ;; esac else - AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) if test "x$SUNCC" = "xyes"; then CWARNFLAGS="-v" fi @@ -2068,28 +2393,43 @@ AC_SUBST(CWARNFLAGS) # ----------------------- # Minimum version: 1.3.0 # -# Add configure option to enable strict compilation +# Add configure option to enable strict compilation flags, such as treating +# warnings as fatal errors. +# If --enable-strict-compilation is passed to configure, adds strict flags to +# $CWARNFLAGS. +# +# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or +# when strict compilation is unconditionally desired. AC_DEFUN([XORG_STRICT_OPTION], [ # If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 AC_REQUIRE([AC_PROG_CC_C99]) +AC_REQUIRE([XORG_COMPILER_BRAND]) AC_REQUIRE([XORG_CWARNFLAGS]) AC_ARG_ENABLE(strict-compilation, AS_HELP_STRING([--enable-strict-compilation], [Enable all warnings from compiler and make them errors (default: disabled)]), [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) +if test "x$GCC" = xyes ; then + STRICT_CFLAGS="-pedantic -Werror" + # Add -Werror=attributes if supported (gcc 4.2 & later) + AC_MSG_CHECKING([if $CC supports -Werror=attributes]) + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $STRICT_CFLAGS -Werror=attributes" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([return 0;])], + [STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes" + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) + CFLAGS="$save_CFLAGS" +elif test "x$SUNCC" = "xyes"; then + STRICT_CFLAGS="-errwarn" +elif test "x$INTELCC" = "xyes"; then + STRICT_CFLAGS="-Werror" +fi if test "x$STRICT_COMPILE" = "xyes"; then - AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) - AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) - if test "x$GCC" = xyes ; then - STRICT_CFLAGS="-pedantic -Werror" - elif test "x$SUNCC" = "xyes"; then - STRICT_CFLAGS="-errwarn" - elif test "x$INTELCC" = "xyes"; then - STRICT_CFLAGS="-Werror" - fi + CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" fi -CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" +AC_SUBST([STRICT_CFLAGS]) AC_SUBST([CWARNFLAGS]) ]) # XORG_STRICT_OPTION diff --git a/app/xinit/config.h.in b/app/xinit/config.h.in index f016d5a2a..dec8dc5d8 100644 --- a/app/xinit/config.h.in +++ b/app/xinit/config.h.in @@ -1,11 +1,17 @@ /* config.h.in. Generated from configure.ac by autoheader. */ +/* Prefix to use for launchd identifiers */ +#undef BUNDLE_ID_PREFIX + /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H /* launchd support available */ #undef HAVE_LAUNCHD +/* Define to 1 if you have the libdispatch (GCD) available */ +#undef HAVE_LIBDISPATCH + /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H @@ -30,9 +36,6 @@ /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H -/* Prefix to use for launchd identifiers */ -#undef LAUNCHD_ID_PREFIX - /* Name of package */ #undef PACKAGE diff --git a/app/xinit/configure b/app/xinit/configure index 75168af06..fdcb64aa1 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.62 for xinit 1.3.0. +# Generated by GNU Autoconf 2.62 for xinit 1.3.1. # # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. # @@ -596,10 +596,11 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='xinit' PACKAGE_TARNAME='xinit' -PACKAGE_VERSION='1.3.0' -PACKAGE_STRING='xinit 1.3.0' +PACKAGE_VERSION='1.3.1' +PACKAGE_STRING='xinit 1.3.1' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' +ac_unique_file="Makefile.am" # Factoring default headers for most tests. ac_includes_default="\ #include <stdio.h> @@ -717,6 +718,7 @@ CPP GREP EGREP CWARNFLAGS +STRICT_CFLAGS CHANGELOG_CMD PKG_CONFIG INSTALL_CMD @@ -749,7 +751,7 @@ RAWCPPFLAGS LAUNCHD launchagentsdir launchdaemonsdir -launchdidprefix +bundleidprefix LAUNCHD_TRUE LAUNCHD_FALSE TIGER_LAUNCHD_TRUE @@ -759,7 +761,7 @@ XINIT_LIBS MCOOKIE STARTX_COOKIE_FLAGS SHELL_CMD -ARCHMANDEFS +SCOMAN XSERVERNAME XCONFIGFILE XCONFIGFILEMAN @@ -797,6 +799,7 @@ with_launchd with_launchagents_dir with_launchdaemons_dir with_launchd_id_prefix +with_bundle_id_prefix ' ac_precious_vars='build_alias host_alias @@ -1362,7 +1365,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.3.0 to adapt to many kinds of systems. +\`configure' configures xinit 1.3.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1432,7 +1435,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xinit 1.3.0:";; + short | recursive ) echo "Configuration of xinit 1.3.1:";; esac cat <<\_ACEOF @@ -1473,7 +1476,9 @@ Optional Packages: Path to launchd's LaunchDaemonss directory (default: /Library/LaunchDaemons) --with-launchd-id-prefix=PATH - Prefix to use for launchd identifiers (default: + Deprecated: Use --with-bundle-id-prefix. + --with-bundle-id-prefix=PATH + Prefix to use for bundle identifiers (default: org.x) Some influential environment variables: @@ -1556,7 +1561,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xinit configure 1.3.0 +xinit configure 1.3.1 generated by GNU Autoconf 2.62 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1570,7 +1575,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xinit $as_me 1.3.0, which was +It was created by xinit $as_me 1.3.1, which was generated by GNU Autoconf 2.62. Invocation command line was $ $0 $@ @@ -1936,6 +1941,11 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_config_headers="$ac_config_headers config.h" + + +# Initialize Automake am__api_version="1.9" ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -2219,7 +2229,7 @@ fi # Define the identity of the package. PACKAGE='xinit' - VERSION='1.3.0' + VERSION='1.3.1' cat >>confdefs.h <<_ACEOF @@ -4331,6 +4341,186 @@ done +{ $as_echo "$as_me:$LINENO: checking whether __clang__ is declared" >&5 +$as_echo_n "checking whether __clang__ is declared... " >&6; } +if test "${ac_cv_have_decl___clang__+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef __clang__ + (void) __clang__; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl___clang__=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl___clang__=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___clang__" >&5 +$as_echo "$ac_cv_have_decl___clang__" >&6; } +if test $ac_cv_have_decl___clang__ = yes; then + CLANGCC="yes" +else + CLANGCC="no" +fi + +{ $as_echo "$as_me:$LINENO: checking whether __INTEL_COMPILER is declared" >&5 +$as_echo_n "checking whether __INTEL_COMPILER is declared... " >&6; } +if test "${ac_cv_have_decl___INTEL_COMPILER+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef __INTEL_COMPILER + (void) __INTEL_COMPILER; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl___INTEL_COMPILER=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl___INTEL_COMPILER=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___INTEL_COMPILER" >&5 +$as_echo "$ac_cv_have_decl___INTEL_COMPILER" >&6; } +if test $ac_cv_have_decl___INTEL_COMPILER = yes; then + INTELCC="yes" +else + INTELCC="no" +fi + +{ $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5 +$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; } +if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef __SUNPRO_C + (void) __SUNPRO_C; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl___SUNPRO_C=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl___SUNPRO_C=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5 +$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; } +if test $ac_cv_have_decl___SUNPRO_C = yes; then + SUNCC="yes" +else + SUNCC="no" +fi + + + + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. @@ -4607,6 +4797,7 @@ $as_echo "$ac_cv_path_SED" >&6; } + if test "x$GCC" = xyes ; then CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ -Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ @@ -4617,65 +4808,6 @@ if test "x$GCC" = xyes ; then ;; esac else - { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5 -$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; } -if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef __SUNPRO_C - (void) __SUNPRO_C; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl___SUNPRO_C=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_have_decl___SUNPRO_C=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5 -$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; } -if test $ac_cv_have_decl___SUNPRO_C = yes; then - SUNCC="yes" -else - SUNCC="no" -fi - if test "x$SUNCC" = "xyes"; then CWARNFLAGS="-v" fi @@ -4687,6 +4819,7 @@ fi + # Check whether --enable-strict-compilation was given. if test "${enable_strict_compilation+set}" = set; then enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval @@ -4694,29 +4827,20 @@ else STRICT_COMPILE=no fi -if test "x$STRICT_COMPILE" = "xyes"; then - { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5 -$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; } -if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF +if test "x$GCC" = xyes ; then + STRICT_CFLAGS="-pedantic -Werror" + # Add -Werror=attributes if supported (gcc 4.2 & later) + { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=attributes" >&5 +$as_echo_n "checking if $CC supports -Werror=attributes... " >&6; } + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $STRICT_CFLAGS -Werror=attributes" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef __SUNPRO_C - (void) __SUNPRO_C; -#endif - - ; - return 0; -} +return 0; _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -4736,92 +4860,28 @@ $as_echo "$ac_try_echo") >&5 test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_cv_have_decl___SUNPRO_C=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_have_decl___SUNPRO_C=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5 -$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; } -if test $ac_cv_have_decl___SUNPRO_C = yes; then - SUNCC="yes" -else - SUNCC="no" -fi - - { $as_echo "$as_me:$LINENO: checking whether __INTEL_COMPILER is declared" >&5 -$as_echo_n "checking whether __INTEL_COMPILER is declared... " >&6; } -if test "${ac_cv_have_decl___INTEL_COMPILER+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef __INTEL_COMPILER - (void) __INTEL_COMPILER; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl___INTEL_COMPILER=yes + STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes" + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_have_decl___INTEL_COMPILER=no + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$save_CFLAGS" +elif test "x$SUNCC" = "xyes"; then + STRICT_CFLAGS="-errwarn" +elif test "x$INTELCC" = "xyes"; then + STRICT_CFLAGS="-Werror" fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___INTEL_COMPILER" >&5 -$as_echo "$ac_cv_have_decl___INTEL_COMPILER" >&6; } -if test $ac_cv_have_decl___INTEL_COMPILER = yes; then - INTELCC="yes" -else - INTELCC="no" +if test "x$STRICT_COMPILE" = "xyes"; then + CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" fi - if test "x$GCC" = xyes ; then - STRICT_CFLAGS="-pedantic -Werror" - elif test "x$SUNCC" = "xyes"; then - STRICT_CFLAGS="-errwarn" - elif test "x$INTELCC" = "xyes"; then - STRICT_CFLAGS="-Werror" - fi -fi -CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" @@ -4959,9 +5019,6 @@ AM_DEFAULT_VERBOSITY=1 -ac_config_headers="$ac_config_headers config.h" - - for ac_prog in cpp @@ -5018,6 +5075,11 @@ test -n "$RAWCPP" || RAWCPP="${CPP}" { $as_echo "$as_me:$LINENO: checking if $RAWCPP requires -undef" >&5 $as_echo_n "checking if $RAWCPP requires -undef... " >&6; } cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ Does cpp redefine unix ? _ACEOF if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then @@ -5044,6 +5106,11 @@ rm -f conftest.$ac_ext { $as_echo "$as_me:$LINENO: checking if $RAWCPP requires -traditional" >&5 $as_echo_n "checking if $RAWCPP requires -traditional... " >&6; } cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ Does cpp preserve "whitespace"? _ACEOF if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then @@ -5101,9 +5168,6 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - - # Build options DEFAULT_XRDB=xrdb DEFAULT_XMODMAP=xmodmap @@ -5243,9 +5307,15 @@ fi # Check whether --with-launchd-id-prefix was given. if test "${with_launchd_id_prefix+set}" = set; then - withval=$with_launchd_id_prefix; launchdidprefix="${withval}" + withval=$with_launchd_id_prefix; bundleidprefix="${withval}" else - launchdidprefix="org.x" + bundleidprefix="org.x" +fi + + +# Check whether --with-bundle-id-prefix was given. +if test "${with_bundle_id_prefix+set}" = set; then + withval=$with_bundle_id_prefix; bundleidprefix="${withval}" fi @@ -5303,6 +5373,99 @@ _ACEOF TIGER_LAUNCHD=yes ;; esac + { $as_echo "$as_me:$LINENO: checking for dispatch_async" >&5 +$as_echo_n "checking for dispatch_async... " >&6; } +if test "${ac_cv_func_dispatch_async+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dispatch_async to an innocuous variant, in case <limits.h> declares dispatch_async. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define dispatch_async innocuous_dispatch_async + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dispatch_async (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef dispatch_async + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dispatch_async (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_dispatch_async || defined __stub___dispatch_async +choke me +#endif + +int +main () +{ +return dispatch_async (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_dispatch_async=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_dispatch_async=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dispatch_async" >&5 +$as_echo "$ac_cv_func_dispatch_async" >&6; } +if test $ac_cv_func_dispatch_async = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBDISPATCH 1 +_ACEOF + +fi + else launchagentsdir="" launchdaemonsdir="" @@ -5310,7 +5473,7 @@ fi cat >>confdefs.h <<_ACEOF -#define LAUNCHD_ID_PREFIX "$launchdidprefix" +#define BUNDLE_ID_PREFIX "$bundleidprefix" _ACEOF @@ -5457,8 +5620,6 @@ case $host_os in esac - - for ac_prog in mcookie do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -5522,11 +5683,10 @@ fi # Additional substitutions in startx, xinitrc & man pages -ARCHMANDEFS="" SHELL_CMD="/bin/sh" XSERVERNAME="Xorg" XCONFIGFILE="xorg.conf" -XCONFIGFILEMAN='${XCONFIGFILE} (__filemansuffix__)' +XCONFIGFILEMAN='${XCONFIGFILE} (${FILE_MAN_SUFFIX})' case $host_os in cygwin*) XSERVERNAME="XWin" @@ -5542,7 +5702,7 @@ case $host_os in ;; *sco*) SHELL_CMD="/bin/ksh" - ARCHMANDEFS="-D__SCOMAN__" + SCOMAN=1 ;; esac @@ -5564,7 +5724,7 @@ esac -ac_config_files="$ac_config_files Makefile" +ac_config_files="$ac_config_files Makefile man/Makefile launchd/Makefile launchd/privileged_startx/Makefile launchd/user_startx/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -6020,7 +6180,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xinit $as_me 1.3.0, which was +This file was extended by xinit $as_me 1.3.1, which was generated by GNU Autoconf 2.62. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6073,7 +6233,7 @@ Report bugs to <bug-autoconf@gnu.org>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -xinit config.status 1.3.0 +xinit config.status 1.3.1 configured by $0, generated by GNU Autoconf 2.62, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -6195,1454 +6355,13 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 for ac_config_target in $ac_config_targets do case $ac_config_target in - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - - *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -$as_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 against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$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 "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || -{ - $as_echo "$as_me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr='
' -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` = $ac_delim_num; then - break - elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\).*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\).*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' <conf$$subs.awk | sed ' -/^[^""]/{ - N - s/\n// -} -' >>$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -$as_echo "$as_me: error: could not setup config files machinery" >&2;} - { (exit 1); exit 1; }; } -_ACEOF - -# 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 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then - break - elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' <confdefs.h | sed ' -s/'"$ac_delim"'/"\\\ -"/g' >>$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - prefix = substr(line, 1, index(line, defundef) - 1) - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #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. - if (defundef == "undef") { - print "/*", line, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 -$as_echo "$as_me: error: could not setup config headers machinery" >&2;} - { (exit 1); exit 1; }; } -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -$as_echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - ac_file_inputs="$ac_file_inputs '$ac_f'" - done - - # 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. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= - -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;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&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 -$as_echo "$as_me: error: could not create -" >&2;} - { (exit 1); exit 1; }; } - 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"" >`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_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 - ;; - - :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) 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=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_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=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir=$dirpart/$fdir - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done - ;; - - esac -done # for ac_tag - - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - - -# 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 -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: Unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2;} -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, we kill variables containing newlines. -# 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. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - 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" && - { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - 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}' - -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_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_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 "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_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 "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${LAUNCHD_TRUE}" && test -z "${LAUNCHD_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"LAUNCHD\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"LAUNCHD\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${TIGER_LAUNCHD_TRUE}" && test -z "${TIGER_LAUNCHD_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"TIGER_LAUNCHD\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"TIGER_LAUNCHD\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi - -: ${CONFIG_STATUS=./config.status} -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -#! $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 || ac_write_fail=1 -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# 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 - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -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 -IFS=$as_save_IFS - - ;; -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 - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; 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 || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # 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 after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, 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 - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_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 sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# 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'" - - -exec 6>&1 - -# Save the log message, to keep $[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by xinit $as_me 1.3.0, which was -generated by GNU Autoconf 2.62. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -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 and configuration settings, 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_write_fail=1 -ac_cs_version="\\ -xinit config.status 1.3.0 -configured by $0, generated by GNU Autoconf 2.62, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2008 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -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 - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - { $as_echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { $as_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" - ac_need_defaults=false ;; - - 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 || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "privileged_startx/Makefile") CONFIG_FILES="$CONFIG_FILES privileged_startx/Makefile" ;; + "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; + "launchd/Makefile") CONFIG_FILES="$CONFIG_FILES launchd/Makefile" ;; + "launchd/privileged_startx/Makefile") CONFIG_FILES="$CONFIG_FILES launchd/privileged_startx/Makefile" ;; + "launchd/user_startx/Makefile") CONFIG_FILES="$CONFIG_FILES launchd/user_startx/Makefile" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} diff --git a/app/xinit/configure.ac b/app/xinit/configure.ac index 0d23ad9cd..ab07e5157 100644 --- a/app/xinit/configure.ac +++ b/app/xinit/configure.ac @@ -20,9 +20,14 @@ dnl PERFORMANCE OF THIS SOFTWARE. dnl dnl Process this file with autoconf to create configure. +# Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([xinit], [1.3.0], +AC_INIT([xinit], [1.3.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xinit]) +AC_CONFIG_SRCDIR([Makefile.am]) +AC_CONFIG_HEADERS([config.h]) + +# Initialize Automake AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE @@ -32,14 +37,9 @@ m4_ifndef([XORG_MACROS_VERSION], XORG_MACROS_VERSION(1.8) XORG_DEFAULT_OPTIONS -AM_CONFIG_HEADER(config.h) - XORG_PROG_RAWCPP AC_CANONICAL_HOST -m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], m4_defn([AC_HELP_STRING]))]) - - # Build options DEFAULT_XRDB=xrdb DEFAULT_XMODMAP=xmodmap @@ -115,9 +115,11 @@ AC_ARG_WITH(launchagents-dir, AS_HELP_STRING([--with-launchagents-dir=PATH], [ 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" ]) -AC_ARG_WITH(launchd-id-prefix, AS_HELP_STRING([--with-launchd-id-prefix=PATH], [Prefix to use for launchd identifiers (default: org.x)]), - [ launchdidprefix="${withval}" ], - [ launchdidprefix="org.x" ]) +AC_ARG_WITH(launchd-id-prefix, AS_HELP_STRING([--with-launchd-id-prefix=PATH], [Deprecated: Use --with-bundle-id-prefix.]), + [ bundleidprefix="${withval}" ], + [ bundleidprefix="org.x" ]) +AC_ARG_WITH(bundle-id-prefix, AS_HELP_STRING([--with-bundle-id-prefix=PATH], [Prefix to use for bundle identifiers (default: org.x)]), + [ bundleidprefix="${withval}" ]) if test "x$LAUNCHD" = "xauto"; then unset LAUNCHD @@ -132,15 +134,18 @@ if test "x$LAUNCHD" = "xyes" ; then TIGER_LAUNCHD=yes ;; esac + AC_CHECK_FUNC(dispatch_async, + AC_DEFINE([HAVE_LIBDISPATCH], 1, [Define to 1 if you have the libdispatch (GCD) available]), + []) else launchagentsdir="" launchdaemonsdir="" fi -AC_DEFINE_UNQUOTED(LAUNCHD_ID_PREFIX, "$launchdidprefix", [Prefix to use for launchd identifiers]) +AC_DEFINE_UNQUOTED(BUNDLE_ID_PREFIX, "$bundleidprefix", [Prefix to use for launchd identifiers]) AC_SUBST([launchagentsdir]) AC_SUBST([launchdaemonsdir]) -AC_SUBST([launchdidprefix]) +AC_SUBST([bundleidprefix]) AM_CONDITIONAL(LAUNCHD, [test "x$LAUNCHD" = "xyes"]) AM_CONDITIONAL(TIGER_LAUNCHD, [test "x$TIGER_LAUNCHD" = "xyes"]) @@ -153,8 +158,6 @@ case $host_os in ;; esac -AC_SUBST(XINIT_CFLAGS) -AC_SUBST(XINIT_LIBS) AC_PATH_PROGS(MCOOKIE, [mcookie], [$MCOOKIE], [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/local/bin]) @@ -174,11 +177,10 @@ fi AC_SUBST(STARTX_COOKIE_FLAGS) # Additional substitutions in startx, xinitrc & man pages -ARCHMANDEFS="" SHELL_CMD="/bin/sh" XSERVERNAME="Xorg" XCONFIGFILE="xorg.conf" -XCONFIGFILEMAN='${XCONFIGFILE} (__filemansuffix__)' +XCONFIGFILEMAN='${XCONFIGFILE} (${FILE_MAN_SUFFIX})' case $host_os in cygwin*) XSERVERNAME="XWin" @@ -194,11 +196,11 @@ case $host_os in ;; *sco*) SHELL_CMD="/bin/ksh" - ARCHMANDEFS="-D__SCOMAN__" + SCOMAN=1 ;; esac AC_SUBST(SHELL_CMD) -AC_SUBST(ARCHMANDEFS) +AC_SUBST(SCOMAN) AC_SUBST(XSERVERNAME) AC_SUBST(XCONFIGFILE) AC_SUBST(XCONFIGFILEMAN) @@ -216,5 +218,9 @@ AC_SUBST(XCONSOLE) AC_SUBST(XINITDIR) -AC_OUTPUT([Makefile]) -AC_OUTPUT([privileged_startx/Makefile]) +AC_CONFIG_FILES([Makefile + man/Makefile + launchd/Makefile + launchd/privileged_startx/Makefile + launchd/user_startx/Makefile]) +AC_OUTPUT diff --git a/app/xinit/cpprules.in b/app/xinit/cpprules.in index 18089dea7..92a987d92 100644 --- a/app/xinit/cpprules.in +++ b/app/xinit/cpprules.in @@ -13,27 +13,7 @@ CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ -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__='$(XSERVERNAME)' \ - -D__XCONFIGFILE__='$(XCONFIGFILE)' \ - -D__XCONFIGFILEMAN__='$(XCONFIGFILEMAN)' \ - -D__xinitdir__=$(XINITDIR) \ - -D__bindir__=$(bindir) \ - -DSHELL_CMD=$(SHELL_CMD) $(ARCHMANDEFS) - -SUFFIXES = .$(APP_MAN_SUFFIX) .man .cpp +SUFFIXES = .cpp .cpp: $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ - -.man.$(APP_MAN_SUFFIX): - $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ diff --git a/app/xinit/launchd/Makefile.am b/app/xinit/launchd/Makefile.am new file mode 100644 index 000000000..f8781ed54 --- /dev/null +++ b/app/xinit/launchd/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = privileged_startx user_startx + +EXTRA_DIST = console_redirect.h diff --git a/app/xinit/launchd/Makefile.in b/app/xinit/launchd/Makefile.in new file mode 100644 index 000000000..c1ab661a5 --- /dev/null +++ b/app/xinit/launchd/Makefile.in @@ -0,0 +1,500 @@ +# 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@ +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 = ${SHELL} $(install_sh) -c -m 644 +install_sh_PROGRAM = ${SHELL} $(install_sh) -c +install_sh_SCRIPT = ${SHELL} $(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@ +subdir = launchd +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GREP = @GREP@ +INSTALL_CMD = @INSTALL_CMD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +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@ +MAN_SUBSTS = @MAN_SUBSTS@ +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@ +SCOMAN = @SCOMAN@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHELL_CMD = @SHELL_CMD@ +STARTX_COOKIE_FLAGS = @STARTX_COOKIE_FLAGS@ +STRICT_CFLAGS = @STRICT_CFLAGS@ +STRIP = @STRIP@ +TIGER_LAUNCHD_FALSE = @TIGER_LAUNCHD_FALSE@ +TIGER_LAUNCHD_TRUE = @TIGER_LAUNCHD_TRUE@ +TWM = @TWM@ +VERSION = @VERSION@ +WM = @WM@ +XAUTH = @XAUTH@ +XCLOCK = @XCLOCK@ +XCONFIGFILE = @XCONFIGFILE@ +XCONFIGFILEMAN = @XCONFIGFILEMAN@ +XCONSOLE = @XCONSOLE@ +XINIT = @XINIT@ +XINITDIR = @XINITDIR@ +XINIT_CFLAGS = @XINIT_CFLAGS@ +XINIT_LIBS = @XINIT_LIBS@ +XMODMAP = @XMODMAP@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +XRDB = @XRDB@ +XSERVER = @XSERVER@ +XSERVERNAME = @XSERVERNAME@ +XTERM = @XTERM@ +ac_ct_CC = @ac_ct_CC@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +bundleidprefix = @bundleidprefix@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +launchagentsdir = @launchagentsdir@ +launchdaemonsdir = @launchdaemonsdir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +SUBDIRS = privileged_startx user_startx +EXTRA_DIST = console_redirect.h +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign launchd/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign launchd/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +uninstall-info-am: + +# 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 \ + 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: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + 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: ctags-recursive $(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) + @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 + 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 +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-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-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-recursive + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-info-am + +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ + clean clean-generic clean-recursive ctags ctags-recursive \ + distclean distclean-generic distclean-recursive 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-man \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + maintainer-clean-recursive mostlyclean mostlyclean-generic \ + mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-info-am + +# 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/launchd/console_redirect.c b/app/xinit/launchd/console_redirect.c new file mode 100644 index 000000000..7ce3626f0 --- /dev/null +++ b/app/xinit/launchd/console_redirect.c @@ -0,0 +1,418 @@ +/* Copyright (c) 2011 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. + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#else +#define DEBUG_CONSOLE_REDIRECT 1 +#define HAVE_LIBDISPATCH 1 +#endif + +#include <assert.h> +#include <unistd.h> +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <sys/types.h> +#include <sys/event.h> +#include <asl.h> +#include <errno.h> +#include <fcntl.h> + +#include "console_redirect.h" + +#define BUF_SIZE 512 + +#ifdef HAVE_LIBDISPATCH +#include <dispatch/dispatch.h> + +static dispatch_queue_t redirect_serial_q; +static dispatch_group_t read_source_group; +#else +#include <pthread.h> + +static pthread_t redirect_pthread; +static pthread_mutex_t redirect_fds_lock = PTHREAD_MUTEX_INITIALIZER; + +static int kq; + +/* Notifications to our reader thread */ +#define ASL_REDIRECT_TERMINATE ((void *)(uintptr_t)1) +#endif + +typedef struct { + int level; + aslclient asl; + aslmsg msg; + + /* Buffered reading */ + char *buf; + char *w; + +#ifdef HAVE_LIBDISPATCH + dispatch_source_t read_source; +#endif +} asl_redirect; + +static asl_redirect *redirect_fds = NULL; +static int n_redirect_fds = 0; + +/* Read from the FD until there is no more to read and redirect to ASL. + * Preconditions: + * 1: pthread_mutex_lock lock is held (pthreads) or called + * from the appropriate serial queue for operating on + * redirect_fds + * 2: fd corresponds to a valid entry in redirect_fds + * + * Return values: + * If the pipe is closed, EOF is returned regardless of how many bytes + * were processed. If the pipe is still open, the number of read bytes + * is returned. + */ +static inline int _read_redirect(int fd, int flush) { + int total_read = 0; + int nbytes; + asl_redirect *aslr = &redirect_fds[fd]; + + while((nbytes = read(fd, aslr->w, BUF_SIZE - (aslr->w - aslr->buf) - 1)) > 0) { + char *s, *p; + + /* Increment our returned number read */ + total_read += nbytes; + + nbytes += (aslr->w - aslr->buf); + aslr->buf[nbytes] = '\0'; + + /* One line at a time */ + for(p=aslr->buf; *p && (p - aslr->buf) < nbytes; p = s + 1) { + // Find null or \n + for(s=p; *s && *s != '\n'; s++); + if(*s == '\n') { + *s='\0'; + asl_log(aslr->asl, aslr->msg, aslr->level, "%s", p); + } else if(aslr->buf != p) { + memmove(aslr->buf, p, BUF_SIZE - (p - aslr->buf)); + aslr->w = aslr->buf + (s - p); + break; + } else if(nbytes == BUF_SIZE - 1) { + asl_log(aslr->asl, aslr->msg, aslr->level, "%s", p); + aslr->w = aslr->buf; + break; + } + } + } + + /* Flush if requested or we're at EOF */ + if(flush || nbytes == 0) { + if(aslr->w > aslr->buf) { + *aslr->w = '\0'; + asl_log(aslr->asl, aslr->msg, aslr->level, "%s", aslr->buf); + } + } + + if(nbytes == 0) + return EOF; + return total_read; +} + +#ifdef HAVE_LIBDISPATCH +static void read_from_source(void *_source) { + dispatch_source_t source = (dispatch_source_t)_source; + int fd = dispatch_source_get_handle(source); + if(_read_redirect(fd, 0) == EOF) { + dispatch_source_cancel(source); + } +} + +static void cancel_source(void *_source) { + dispatch_source_t source = (dispatch_source_t)_source; + int fd = dispatch_source_get_handle(source); + asl_redirect *aslr = &redirect_fds[fd]; + + /* Flush the buffer */ + _read_redirect(fd, 1); + + close(fd); + free(aslr->buf); + memset(aslr, 0, sizeof(*aslr)); + dispatch_release(source); + dispatch_group_leave(read_source_group); +} + +#else /* !HAVE_LIBDISPATCH */ +static void *redirect_thread(void *ctx __unused) { + struct kevent ev; + int n; + + while(1) { + n = kevent(kq, NULL, 0, &ev, 1, NULL); + + /* Bail on errors */ + if(n < 0) { + asl_log(NULL, NULL, ASL_LEVEL_ERR, "kevent failure: %s", strerror(errno)); + break; + } + + /* This should not happen */ + if(n == 0) + continue; + + switch(ev.filter) { + case EVFILT_READ: + pthread_mutex_lock(&redirect_fds_lock); + { + int fd = ev.ident; + int close_fd = 0; + asl_redirect *aslr = &redirect_fds[fd]; + + if(fd < 0 || fd >= n_redirect_fds || aslr->buf == NULL) { + asl_log(NULL, NULL, ASL_LEVEL_ERR, "Unexpected file descriptor: %d", fd); + goto next; + } + + if(ev.flags & EV_EOF) { + close_fd = 1; + if(EOF != _read_redirect(fd, 1)) { + asl_log(NULL, NULL, ASL_LEVEL_ERR, "kevent reported EOF on %d, but read doesn't concur.", fd); + } + } else { + close_fd = (EOF == _read_redirect(fd, 0)); + } + + if(close_fd) { + EV_SET(&ev, fd, EVFILT_READ, EV_DELETE, 0, 0, 0); + kevent(kq, &ev, 1, NULL, 0, NULL); + close(fd); + free(aslr->buf); + memset(aslr, 0, sizeof(*aslr)); + } + } + next: + pthread_mutex_unlock(&redirect_fds_lock); + + case EVFILT_TIMER: + if(ev.udata == ASL_REDIRECT_TERMINATE) + return NULL; + + default: + ;; + } + } + + return NULL; +} +#endif + +static void redirect_atexit(void) { + /* stdout is linebuffered, so flush the buffer */ + if(redirect_fds[STDOUT_FILENO].buf) + fflush(stdout); + +#ifdef HAVE_LIBDISPATCH + { + int i; + + /* Cancel all of our dispatch sources, so they flush to ASL */ + for(i=0; i < n_redirect_fds; i++) + if(redirect_fds[i].read_source) + dispatch_source_cancel(redirect_fds[i].read_source); + + /* Wait at least three seconds for our sources to flush to ASL */ + dispatch_group_wait(read_source_group, dispatch_time(DISPATCH_TIME_NOW, 3LL * NSEC_PER_SEC)); + } +#else + { + struct kevent ev; + + /* Tell our reader thread it is time to pack up and go home */ + EV_SET(&ev, 0, EVFILT_TIMER, EV_ADD | EV_ONESHOT, 0, 0, ASL_REDIRECT_TERMINATE); + kevent(kq, &ev, 1, NULL, 0, NULL); + + pthread_join(redirect_pthread, NULL); + } +#endif +} + +#ifdef HAVE_LIBDISPATCH +static void xi_asl_init(void *ctx __unused) +#else +static void xi_asl_init(void) +#endif +{ + assert((redirect_fds = calloc(16, sizeof(*redirect_fds))) != NULL); + n_redirect_fds = 16; + +#ifdef HAVE_LIBDISPATCH + redirect_serial_q = dispatch_queue_create("com.apple.asl-redirect", NULL); + assert(redirect_serial_q != NULL); + + read_source_group = dispatch_group_create(); + assert(read_source_group != NULL); +#else + assert((kq = kqueue()) != -1); + assert(pthread_create(&redirect_pthread, NULL, redirect_thread, NULL) == 0); +#endif + + atexit(redirect_atexit); +} + +int xi_asl_log_fd(aslclient asl, aslmsg msg, int level, int fd) { +#ifdef HAVE_LIBDISPATCH + int err __block = 0; + static dispatch_once_t once_control; + dispatch_once_f(&once_control, NULL, xi_asl_init); +#else + int err = 0; + static pthread_once_t once_control = PTHREAD_ONCE_INIT; + assert(pthread_once(&once_control, xi_asl_init) == 0); +#endif + + if(fd < 0) + return EBADF; + +#ifdef HAVE_LIBDISPATCH +#define BLOCK_DONE return + dispatch_sync(redirect_serial_q, ^ +#else +#define BLOCK_DONE goto done + assert(pthread_mutex_lock(&redirect_fds_lock) == 0); +#endif + { + /* Reallocate if we need more space */ + if(fd >= n_redirect_fds) { + size_t new_n = 1 << (ffs(fd) + 1); + asl_redirect *new_array = realloc(redirect_fds, new_n * sizeof(*redirect_fds)); + if(!new_array) { + err = errno; + BLOCK_DONE; + } + redirect_fds = new_array; + memset(redirect_fds + n_redirect_fds, 0, new_n - n_redirect_fds); + n_redirect_fds = new_n; + } + + /* If we're already listening on it, return error. */ + if(redirect_fds[fd].buf != NULL) { + err = EBADF; + BLOCK_DONE; + } + + /* Initialize our buffer */ + redirect_fds[fd].buf = (char *)malloc(BUF_SIZE); + if(redirect_fds[fd].buf == NULL) { + err = errno; + BLOCK_DONE; + } + redirect_fds[fd].w = redirect_fds[fd].buf; + + /* Store our ASL settings */ + redirect_fds[fd].level = level; + redirect_fds[fd].asl = asl; + redirect_fds[fd].msg = msg; + + /* Don't block on reads from this fd */ + fcntl(fd, F_SETFL, O_NONBLOCK); + + /* Start listening */ +#ifdef HAVE_LIBDISPATCH + { + dispatch_source_t read_source = dispatch_source_create(DISPATCH_SOURCE_TYPE_READ, fd, 0, redirect_serial_q); + redirect_fds[fd].read_source = read_source; + dispatch_set_context(read_source, read_source); + dispatch_source_set_event_handler_f(read_source, read_from_source); + dispatch_source_set_cancel_handler_f(read_source, cancel_source); + dispatch_group_enter(read_source_group); + dispatch_resume(read_source); + } +#else + { + struct kevent ev; + EV_SET(&ev, fd, EVFILT_READ, EV_ADD, 0, 0, 0); + kevent(kq, &ev, 1, NULL, 0, NULL); + } +#endif + } +#ifdef HAVE_LIBDISPATCH + ); +#else +done: + assert(pthread_mutex_unlock(&redirect_fds_lock) == 0); +#endif +#undef BLOCK_DONE + + return err; +} + +int xi_asl_capture_fd(aslclient asl, aslmsg msg, int level, int fd) { + int pipepair[2]; + + /* Create pipe */ + if(pipe(pipepair) == -1) + return errno; + + /* Close the read fd but not the write fd on exec */ + if(fcntl(pipepair[0], F_SETFD, FD_CLOEXEC) == -1) + return errno; + + /* Replace the existing fd */ + if(dup2(pipepair[1], fd) == -1) { + close(pipepair[0]); + close(pipepair[1]); + return errno; + } + + /* If we capture STDOUT_FILENO, make sure we linebuffer stdout */ + if(fd == STDOUT_FILENO) + setlinebuf(stdout); + + /* Close the duplicate fds since they've been reassigned */ + close(pipepair[1]); + + /* Hand off the read end of our pipe to xi_asl_log_fd */ + return xi_asl_log_fd(asl, msg, level, pipepair[0]); +} + +#ifdef DEBUG_CONSOLE_REDIRECT +int main(int argc __unused, char **argv __unused) { + xi_asl_capture_fd(NULL, NULL, ASL_LEVEL_NOTICE, STDOUT_FILENO); + xi_asl_capture_fd(NULL, NULL, ASL_LEVEL_ERR, STDERR_FILENO); + + fprintf(stderr, "TEST ERR1\n"); + fprintf(stdout, "TEST OUT1\n"); + fprintf(stderr, "TEST ERR2\n"); + fprintf(stdout, "TEST OUT2\n"); + system("/bin/echo SYST OUT"); + system("/bin/echo SYST ERR >&2"); + fprintf(stdout, "TEST OUT3\n"); + fprintf(stdout, "TEST OUT4\n"); + fprintf(stderr, "TEST ERR3\n"); + fprintf(stderr, "TEST ERR4\n"); + + exit(0); +} +#endif diff --git a/app/xinit/launchd/console_redirect.h b/app/xinit/launchd/console_redirect.h new file mode 100644 index 000000000..134def655 --- /dev/null +++ b/app/xinit/launchd/console_redirect.h @@ -0,0 +1,44 @@ +/* Copyright (c) 2011 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. + */ + +#ifndef _XQUARTZ_CONSOLE_REDIRECT_H_ +#define _XQUARTZ_CONSOLE_REDIRECT_H_ + +#include <asl.h> + +/* The given fd is replaced with a pipe. Anything written to it will will be + * logged to ASL. + */ +int xi_asl_capture_fd(aslclient asl, aslmsg msg, int level, int fd); + +/* The given fd is read from and passed along to ASL until all write ends of the + * pipe are closed. Once the last writer has closed the pipe, we close our end. + */ +int xi_asl_log_fd(aslclient asl, aslmsg msg, int level, int fd); + +#endif diff --git a/app/xinit/privileged_startx/10-tmpdirs.cpp b/app/xinit/launchd/privileged_startx/10-tmpdirs.cpp index e30abac85..8012597f9 100644 --- a/app/xinit/privileged_startx/10-tmpdirs.cpp +++ b/app/xinit/launchd/privileged_startx/10-tmpdirs.cpp @@ -27,10 +27,19 @@ XCOMM promote the sale, use or other dealings in this Software without XCOMM prior written authorization. XCOMM Make sure these are owned by root + +XCOMM Our usage of mktemp fails with GNU, so prefer /usr/bin to hopefully +XCOMM get BSD mktemp +if [ -x /usr/bin/mktemp ] ; then + MKTEMP=/usr/bin/mktemp +else + MKTEMP=mktemp +fi + 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 + XCOMM Use mktemp rather than mkdir to avoid possible security issue + XCOMM if $dir exists and is a symlink + if ${MKTEMP} -d ${dir} >& /dev/null ; then chmod 1777 $dir chown root:wheel $dir fi diff --git a/app/xinit/privileged_startx/20-font_cache.cpp b/app/xinit/launchd/privileged_startx/20-font_cache.cpp index 6d43e107b..6d43e107b 100644 --- a/app/xinit/privileged_startx/20-font_cache.cpp +++ b/app/xinit/launchd/privileged_startx/20-font_cache.cpp diff --git a/app/xinit/privileged_startx/Makefile.am b/app/xinit/launchd/privileged_startx/Makefile.am index 453f6e722..811cbdbd0 100644 --- a/app/xinit/privileged_startx/Makefile.am +++ b/app/xinit/launchd/privileged_startx/Makefile.am @@ -33,14 +33,15 @@ 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)" -DLAUNCHD_ID_PREFIX="$(launchdidprefix)" +AM_CPPFLAGS = -I$(srcdir)/.. -DXINITDIR=\"$(xinitrcdir)\" -DSCRIPTDIR=\"$(privstartxdir)\" -DBINDIR=\"$(bindir)\" +CPP_FILES_FLAGS = -DXINITDIR="$(xinitrcdir)" -DSCRIPTDIR="$(privstartxdir)" -DBINDIR="$(bindir)" -DBUNDLE_ID_PREFIX="$(bundleidprefix)" if TIGER_LAUNCHD CPP_FILES_FLAGS += -DTIGER_LAUNCHD endif dist_privileged_startx_SOURCES = \ + $(srcdir)/../console_redirect.c \ server.c \ client.c \ privileged_startx.c @@ -55,10 +56,10 @@ BUILT_SOURCES = \ privileged_startxServer.h \ privileged_startx.h -$(launchdidprefix).privileged_startx.plist.cpp: org.x.privileged_startx.plist.cpp +$(bundleidprefix).privileged_startx.plist.cpp: privileged_startx.plist.cpp cp $< $@ -launchdaemons_PRE = $(launchdidprefix).privileged_startx.plist.cpp +launchdaemons_PRE = $(bundleidprefix).privileged_startx.plist.cpp launchdaemons_DATA = $(launchdaemons_PRE:plist.cpp=plist) 10-tmpdirs: 10-tmpdirs.cpp Makefile @@ -67,12 +68,13 @@ launchdaemons_DATA = $(launchdaemons_PRE:plist.cpp=plist) CLEANFILES = \ $(privstartx_SCRIPTS) \ $(BUILT_SOURCES) \ - $(launchdaemons_DATA) + $(launchdaemons_DATA) \ + $(bundleidprefix).privileged_startx.plist.cpp EXTRA_DIST = \ 10-tmpdirs.cpp \ 20-font_cache.cpp \ - org.x.privileged_startx.plist.cpp \ + privileged_startx.plist.cpp \ privileged_startx.defs \ privileged_startx_types.h diff --git a/app/xinit/privileged_startx/Makefile.in b/app/xinit/launchd/privileged_startx/Makefile.in index 6bc30360c..349163e20 100644 --- a/app/xinit/privileged_startx/Makefile.in +++ b/app/xinit/launchd/privileged_startx/Makefile.in @@ -56,12 +56,12 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. +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_sh_DATA = ${SHELL} $(install_sh) -c -m 644 +install_sh_PROGRAM = ${SHELL} $(install_sh) -c +install_sh_SCRIPT = ${SHELL} $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : @@ -76,7 +76,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/cpprules.in xinitrc_PROGRAMS = privileged_startx$(EXEEXT) @TIGER_LAUNCHD_TRUE@am__append_1 = -DTIGER_LAUNCHD -subdir = privileged_startx +subdir = launchd/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) \ @@ -88,8 +88,8 @@ 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) +dist_privileged_startx_OBJECTS = console_redirect.$(OBJEXT) \ + server.$(OBJEXT) client.$(OBJEXT) privileged_startx.$(OBJEXT) nodist_privileged_startx_OBJECTS = privileged_startxServer.$(OBJEXT) \ privileged_startxUser.$(OBJEXT) privileged_startx_OBJECTS = $(dist_privileged_startx_OBJECTS) \ @@ -127,7 +127,6 @@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ -ARCHMANDEFS = @ARCHMANDEFS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -185,11 +184,13 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ +SCOMAN = @SCOMAN@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHELL_CMD = @SHELL_CMD@ STARTX_COOKIE_FLAGS = @STARTX_COOKIE_FLAGS@ +STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ TIGER_LAUNCHD_FALSE = @TIGER_LAUNCHD_FALSE@ TIGER_LAUNCHD_TRUE = @TIGER_LAUNCHD_TRUE@ @@ -225,6 +226,7 @@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +bundleidprefix = @bundleidprefix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -241,7 +243,6 @@ infodir = @infodir@ install_sh = @install_sh@ launchagentsdir = @launchagentsdir@ launchdaemonsdir = @launchdaemonsdir@ -launchdidprefix = @launchdidprefix@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ @@ -265,32 +266,16 @@ CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ -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__='$(XSERVERNAME)' \ - -D__XCONFIGFILE__='$(XCONFIGFILE)' \ - -D__XCONFIGFILEMAN__='$(XCONFIGFILEMAN)' \ - -D__xinitdir__=$(XINITDIR) \ - -D__bindir__=$(bindir) \ - -DSHELL_CMD=$(SHELL_CMD) $(ARCHMANDEFS) - -SUFFIXES = .$(APP_MAN_SUFFIX) .man .cpp +SUFFIXES = .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)\" +AM_CPPFLAGS = -I$(srcdir)/.. -DXINITDIR=\"$(xinitrcdir)\" -DSCRIPTDIR=\"$(privstartxdir)\" -DBINDIR=\"$(bindir)\" CPP_FILES_FLAGS = -DXINITDIR="$(xinitrcdir)" \ -DSCRIPTDIR="$(privstartxdir)" -DBINDIR="$(bindir)" \ - -DLAUNCHD_ID_PREFIX="$(launchdidprefix)" $(am__append_1) + -DBUNDLE_ID_PREFIX="$(bundleidprefix)" $(am__append_1) dist_privileged_startx_SOURCES = \ + $(srcdir)/../console_redirect.c \ server.c \ client.c \ privileged_startx.c @@ -305,17 +290,18 @@ BUILT_SOURCES = \ privileged_startxServer.h \ privileged_startx.h -launchdaemons_PRE = $(launchdidprefix).privileged_startx.plist.cpp +launchdaemons_PRE = $(bundleidprefix).privileged_startx.plist.cpp launchdaemons_DATA = $(launchdaemons_PRE:plist.cpp=plist) CLEANFILES = \ $(privstartx_SCRIPTS) \ $(BUILT_SOURCES) \ - $(launchdaemons_DATA) + $(launchdaemons_DATA) \ + $(bundleidprefix).privileged_startx.plist.cpp EXTRA_DIST = \ 10-tmpdirs.cpp \ 20-font_cache.cpp \ - org.x.privileged_startx.plist.cpp \ + privileged_startx.plist.cpp \ privileged_startx.defs \ privileged_startx_types.h @@ -323,7 +309,7 @@ all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: -.SUFFIXES: .$(APP_MAN_SUFFIX) .man .cpp .c .o .obj +.SUFFIXES: .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 \ @@ -333,9 +319,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign privileged_startx/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign launchd/privileged_startx/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign privileged_startx/Makefile + $(AUTOMAKE) --foreign launchd/privileged_startx/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -406,6 +392,7 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/console_redirect.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@ @@ -424,6 +411,20 @@ distclean-compile: @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) '$<'` + +console_redirect.o: $(srcdir)/../console_redirect.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT console_redirect.o -MD -MP -MF "$(DEPDIR)/console_redirect.Tpo" -c -o console_redirect.o `test -f '$(srcdir)/../console_redirect.c' || echo '$(srcdir)/'`$(srcdir)/../console_redirect.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/console_redirect.Tpo" "$(DEPDIR)/console_redirect.Po"; else rm -f "$(DEPDIR)/console_redirect.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../console_redirect.c' object='console_redirect.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o console_redirect.o `test -f '$(srcdir)/../console_redirect.c' || echo '$(srcdir)/'`$(srcdir)/../console_redirect.c + +console_redirect.obj: $(srcdir)/../console_redirect.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT console_redirect.obj -MD -MP -MF "$(DEPDIR)/console_redirect.Tpo" -c -o console_redirect.obj `if test -f '$(srcdir)/../console_redirect.c'; then $(CYGPATH_W) '$(srcdir)/../console_redirect.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../console_redirect.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/console_redirect.Tpo" "$(DEPDIR)/console_redirect.Po"; else rm -f "$(DEPDIR)/console_redirect.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../console_redirect.c' object='console_redirect.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o console_redirect.obj `if test -f '$(srcdir)/../console_redirect.c'; then $(CYGPATH_W) '$(srcdir)/../console_redirect.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../console_redirect.c'; fi` uninstall-info-am: install-launchdaemonsDATA: $(launchdaemons_DATA) @$(NORMAL_INSTALL) @@ -492,7 +493,7 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/.. + $(mkdir_p) $(distdir)/../.. @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ @@ -623,10 +624,7 @@ uninstall-am: uninstall-info-am uninstall-launchdaemonsDATA \ .cpp: $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ -.man.$(APP_MAN_SUFFIX): - $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ - -$(launchdidprefix).privileged_startx.plist.cpp: org.x.privileged_startx.plist.cpp +$(bundleidprefix).privileged_startx.plist.cpp: privileged_startx.plist.cpp cp $< $@ 10-tmpdirs: 10-tmpdirs.cpp Makefile diff --git a/app/xinit/privileged_startx/client.c b/app/xinit/launchd/privileged_startx/client.c index 8e1a771ce..6c3a6d6f8 100644 --- a/app/xinit/privileged_startx/client.c +++ b/app/xinit/launchd/privileged_startx/client.c @@ -26,6 +26,10 @@ * prior written authorization. */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #include <mach/mach.h> #include <mach/mach_error.h> #include <servers/bootstrap.h> diff --git a/app/xinit/privileged_startx/privileged_startx.c b/app/xinit/launchd/privileged_startx/privileged_startx.c index 725a1b0a7..b71c30bdd 100644 --- a/app/xinit/privileged_startx/privileged_startx.c +++ b/app/xinit/launchd/privileged_startx/privileged_startx.c @@ -26,6 +26,10 @@ * prior written authorization. */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #include <string.h> #include <stdio.h> diff --git a/app/xinit/privileged_startx/privileged_startx.defs b/app/xinit/launchd/privileged_startx/privileged_startx.defs index 86f2b3a06..86f2b3a06 100644 --- a/app/xinit/privileged_startx/privileged_startx.defs +++ b/app/xinit/launchd/privileged_startx/privileged_startx.defs diff --git a/app/xinit/privileged_startx/org.x.privileged_startx.plist.cpp b/app/xinit/launchd/privileged_startx/privileged_startx.plist.cpp index 02e1cce4e..533fc32b2 100644 --- a/app/xinit/privileged_startx/org.x.privileged_startx.plist.cpp +++ b/app/xinit/launchd/privileged_startx/privileged_startx.plist.cpp @@ -3,7 +3,7 @@ <plist version="1.0"> <dict> <key>Label</key> - <string>LAUNCHD_ID_PREFIX.privileged_startx</string> + <string>BUNDLE_ID_PREFIX.privileged_startx</string> <key>ProgramArguments</key> <array> <string>XINITDIR/privileged_startx</string> @@ -16,7 +16,7 @@ #else <key>MachServices</key> <dict> - <key>LAUNCHD_ID_PREFIX.privileged_startx</key> + <key>BUNDLE_ID_PREFIX.privileged_startx</key> <true/> </dict> <key>TimeOut</key> diff --git a/app/xinit/privileged_startx/privileged_startx_types.h b/app/xinit/launchd/privileged_startx/privileged_startx_types.h index 8928e648f..a0d343980 100644 --- a/app/xinit/privileged_startx/privileged_startx_types.h +++ b/app/xinit/launchd/privileged_startx/privileged_startx_types.h @@ -5,6 +5,6 @@ #include <config.h> #endif -#define BOOTSTRAP_NAME LAUNCHD_ID_PREFIX".privileged_startx" +#define BOOTSTRAP_NAME BUNDLE_ID_PREFIX".privileged_startx" #endif diff --git a/app/xinit/privileged_startx/server.c b/app/xinit/launchd/privileged_startx/server.c index 4415943ab..cfbb62311 100644 --- a/app/xinit/privileged_startx/server.c +++ b/app/xinit/launchd/privileged_startx/server.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 Apple Inc. +/* Copyright (c) 2008-2011 Apple Inc. * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation files @@ -27,7 +27,7 @@ */ #ifdef HAVE_CONFIG_H -#include <config.h> +# include "config.h" #endif #include <mach/mach.h> @@ -46,6 +46,8 @@ #include <asl.h> #include <errno.h> +#include "console_redirect.h" + #include "privileged_startx.h" #include "privileged_startxServer.h" @@ -90,19 +92,19 @@ static mach_port_t checkin_or_register(char *bname) { /* We probably were not started by launchd or the old mach_init */ kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &mp); if (kr != KERN_SUCCESS) { - fprintf(stderr, "mach_port_allocate(): %s\n", mach_error_string(kr)); + asl_log(NULL, NULL, ASL_LEVEL_ERR, "mach_port_allocate(): %s", mach_error_string(kr)); exit(EXIT_FAILURE); } kr = mach_port_insert_right(mach_task_self(), mp, mp, MACH_MSG_TYPE_MAKE_SEND); if (kr != KERN_SUCCESS) { - fprintf(stderr, "mach_port_insert_right(): %s\n", mach_error_string(kr)); + asl_log(NULL, NULL, ASL_LEVEL_ERR, "mach_port_insert_right(): %s", mach_error_string(kr)); exit(EXIT_FAILURE); } kr = bootstrap_register(bootstrap_port, bname, mp); if (kr != KERN_SUCCESS) { - fprintf(stderr, "bootstrap_register(): %s\n", mach_error_string(kr)); + asl_log(NULL, NULL, ASL_LEVEL_ERR, "bootstrap_register(): %s", mach_error_string(kr)); exit(EXIT_FAILURE); } @@ -118,7 +120,10 @@ int server_main(const char *dir) { long idle_timeout = DEFAULT_IDLE_TIMEOUT; #endif - launch_data_t config = NULL, checkin = NULL; + launch_data_t config = NULL, checkin = NULL, label = NULL; + const char *labelstr = BUNDLE_ID_PREFIX".privileged_startx"; + aslclient aslc; + checkin = launch_data_new_string(LAUNCH_KEY_CHECKIN); config = launch_msg(checkin); if (!config || launch_data_get_type(config) == LAUNCH_DATA_ERRNO) { @@ -132,6 +137,15 @@ int server_main(const char *dir) { "script directory set: %s", script_dir); } + label = launch_data_dict_lookup(config, LAUNCH_JOBKEY_LABEL); + if (label) { + labelstr = launch_data_get_string(label); + } + + aslc = asl_open(labelstr, BUNDLE_ID_PREFIX, ASL_OPT_NO_DELAY); + xi_asl_capture_fd(aslc, NULL, ASL_LEVEL_INFO, STDOUT_FILENO); + xi_asl_capture_fd(aslc, NULL, ASL_LEVEL_NOTICE, STDERR_FILENO); + #ifdef LAUNCH_JOBKEY_MACHSERVICES launch_data_t tmv; tmv = launch_data_dict_lookup(config, LAUNCH_JOBKEY_TIMEOUT); @@ -157,7 +171,7 @@ int server_main(const char *dir) { mp = launch_data_get_machport(svc); #else - mp = checkin_or_register(LAUNCHD_ID_PREFIX".privileged_startx"); + mp = checkin_or_register(BUNDLE_ID_PREFIX".privileged_startx"); #endif if (mp == MACH_PORT_NULL) { @@ -188,7 +202,7 @@ int server_main(const char *dir) { 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)); + "mach_msg_server(mp): %s", mach_error_string(kr)); exit(EXIT_FAILURE); } @@ -218,7 +232,7 @@ kern_return_t do_privileged_startx(mach_port_t test_port __attribute__((unused)) ftsp = fts_open((char * const *)path_argv, FTS_PHYSICAL, ftscmp); if(!ftsp) { asl_log(NULL, NULL, ASL_LEVEL_ERR, - "do_privileged_startx: fts_open(%s): %s\n", + "do_privileged_startx: fts_open(%s): %s", script_dir, strerror(errno)); return KERN_FAILURE; } @@ -227,7 +241,7 @@ kern_return_t do_privileged_startx(mach_port_t test_port __attribute__((unused)) ftsent = fts_read(ftsp); if(!ftsent) { asl_log(NULL, NULL, ASL_LEVEL_ERR, - "do_privileged_startx: fts_read(): %s\n", strerror(errno)); + "do_privileged_startx: fts_read(): %s", strerror(errno)); fts_close(ftsp); return KERN_FAILURE; } @@ -236,7 +250,7 @@ kern_return_t do_privileged_startx(mach_port_t test_port __attribute__((unused)) ftsent = fts_children(ftsp, 0); if(!ftsent) { asl_log(NULL, NULL, ASL_LEVEL_ERR, - "do_privileged_startx: fts_children(): %s\n", strerror(errno)); + "do_privileged_startx: fts_children(): %s", strerror(errno)); fts_close(ftsp); return KERN_FAILURE; } @@ -260,7 +274,7 @@ kern_return_t do_privileged_startx(mach_port_t test_port __attribute__((unused)) 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", + "do_privileged_startx: %s: exited with status %d", fn_buf, error_code); retval = KERN_FAILURE; } diff --git a/app/xinit/launchd/user_startx/Makefile.am b/app/xinit/launchd/user_startx/Makefile.am new file mode 100644 index 000000000..ce00e73e3 --- /dev/null +++ b/app/xinit/launchd/user_startx/Makefile.am @@ -0,0 +1,49 @@ +# +# Copyright 2005 Red Hat, Inc. +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of Red Hat not be used in +# advertising or publicity pertaining to distribution of the software without +# specific, written prior permission. Red Hat makes no +# representations about the suitability of this software for any purpose. It +# is provided "as is" without express or implied warranty. +# +# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR +# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +# PERFORMANCE OF THIS SOFTWARE. + +include $(top_srcdir)/cpprules.in + +xinitrcdir = $(XINITDIR) + +xinitrc_PROGRAMS = launchd_startx + +AM_CPPFLAGS = -I$(srcdir)/.. -DXINITDIR=\"$(xinitrcdir)\" -DBINDIR=\"$(bindir)\" + +dist_launchd_startx_SOURCES = \ + $(srcdir)/../console_redirect.c \ + launchd_startx.c + +CPP_FILES_FLAGS = \ + -D__xinitrcdir__="$(xinitrcdir)" \ + -D__bindir__="$(bindir)" \ + -DBUNDLE_ID_PREFIX="$(bundleidprefix)" + +$(bundleidprefix).startx.plist.cpp: startx.plist.cpp + cp $< $@ + +launchagents_PRE = $(bundleidprefix).startx.plist.cpp +launchagents_DATA = $(launchagents_PRE:plist.cpp=plist) + +EXTRA_DIST = startx.plist.cpp + +CLEANFILES = \ + $(launchagents_DATA) \ + $(bundleidprefix).startx.plist.cpp diff --git a/app/xinit/launchd/user_startx/Makefile.in b/app/xinit/launchd/user_startx/Makefile.in new file mode 100644 index 000000000..a3842b524 --- /dev/null +++ b/app/xinit/launchd/user_startx/Makefile.in @@ -0,0 +1,568 @@ +# 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 2005 Red Hat, Inc. +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of Red Hat not be used in +# advertising or publicity pertaining to distribution of the software without +# specific, written prior permission. Red Hat makes no +# representations about the suitability of this software for any purpose. It +# is provided "as is" without express or implied warranty. +# +# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR +# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +# PERFORMANCE OF THIS SOFTWARE. + +# 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 = ${SHELL} $(install_sh) -c -m 644 +install_sh_PROGRAM = ${SHELL} $(install_sh) -c +install_sh_SCRIPT = ${SHELL} $(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 = launchd_startx$(EXEEXT) +subdir = launchd/user_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)$(launchagentsdir)" +xinitrcPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(xinitrc_PROGRAMS) +dist_launchd_startx_OBJECTS = console_redirect.$(OBJEXT) \ + launchd_startx.$(OBJEXT) +launchd_startx_OBJECTS = $(dist_launchd_startx_OBJECTS) +launchd_startx_LDADD = $(LDADD) +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_launchd_startx_SOURCES) +DIST_SOURCES = $(dist_launchd_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|^.*/||'`; +launchagentsDATA_INSTALL = $(INSTALL_DATA) +DATA = $(launchagents_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@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GREP = @GREP@ +INSTALL_CMD = @INSTALL_CMD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +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@ +MAN_SUBSTS = @MAN_SUBSTS@ +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@ +SCOMAN = @SCOMAN@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHELL_CMD = @SHELL_CMD@ +STARTX_COOKIE_FLAGS = @STARTX_COOKIE_FLAGS@ +STRICT_CFLAGS = @STRICT_CFLAGS@ +STRIP = @STRIP@ +TIGER_LAUNCHD_FALSE = @TIGER_LAUNCHD_FALSE@ +TIGER_LAUNCHD_TRUE = @TIGER_LAUNCHD_TRUE@ +TWM = @TWM@ +VERSION = @VERSION@ +WM = @WM@ +XAUTH = @XAUTH@ +XCLOCK = @XCLOCK@ +XCONFIGFILE = @XCONFIGFILE@ +XCONFIGFILEMAN = @XCONFIGFILEMAN@ +XCONSOLE = @XCONSOLE@ +XINIT = @XINIT@ +XINITDIR = @XINITDIR@ +XINIT_CFLAGS = @XINIT_CFLAGS@ +XINIT_LIBS = @XINIT_LIBS@ +XMODMAP = @XMODMAP@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +XRDB = @XRDB@ +XSERVER = @XSERVER@ +XSERVERNAME = @XSERVERNAME@ +XTERM = @XTERM@ +ac_ct_CC = @ac_ct_CC@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +bundleidprefix = @bundleidprefix@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +launchagentsdir = @launchagentsdir@ +launchdaemonsdir = @launchdaemonsdir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +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/\@\@$$/\\/' + +SUFFIXES = .cpp +xinitrcdir = $(XINITDIR) +AM_CPPFLAGS = -I$(srcdir)/.. -DXINITDIR=\"$(xinitrcdir)\" -DBINDIR=\"$(bindir)\" +dist_launchd_startx_SOURCES = \ + $(srcdir)/../console_redirect.c \ + launchd_startx.c + +CPP_FILES_FLAGS = \ + -D__xinitrcdir__="$(xinitrcdir)" \ + -D__bindir__="$(bindir)" \ + -DBUNDLE_ID_PREFIX="$(bundleidprefix)" + +launchagents_PRE = $(bundleidprefix).startx.plist.cpp +launchagents_DATA = $(launchagents_PRE:plist.cpp=plist) +EXTRA_DIST = startx.plist.cpp +CLEANFILES = \ + $(launchagents_DATA) \ + $(bundleidprefix).startx.plist.cpp + +all: all-am + +.SUFFIXES: +.SUFFIXES: .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) --foreign launchd/user_startx/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign launchd/user_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) +launchd_startx$(EXEEXT): $(launchd_startx_OBJECTS) $(launchd_startx_DEPENDENCIES) + @rm -f launchd_startx$(EXEEXT) + $(LINK) $(launchd_startx_LDFLAGS) $(launchd_startx_OBJECTS) $(launchd_startx_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/console_redirect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/launchd_startx.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) '$<'` + +console_redirect.o: $(srcdir)/../console_redirect.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT console_redirect.o -MD -MP -MF "$(DEPDIR)/console_redirect.Tpo" -c -o console_redirect.o `test -f '$(srcdir)/../console_redirect.c' || echo '$(srcdir)/'`$(srcdir)/../console_redirect.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/console_redirect.Tpo" "$(DEPDIR)/console_redirect.Po"; else rm -f "$(DEPDIR)/console_redirect.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../console_redirect.c' object='console_redirect.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o console_redirect.o `test -f '$(srcdir)/../console_redirect.c' || echo '$(srcdir)/'`$(srcdir)/../console_redirect.c + +console_redirect.obj: $(srcdir)/../console_redirect.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT console_redirect.obj -MD -MP -MF "$(DEPDIR)/console_redirect.Tpo" -c -o console_redirect.obj `if test -f '$(srcdir)/../console_redirect.c'; then $(CYGPATH_W) '$(srcdir)/../console_redirect.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../console_redirect.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/console_redirect.Tpo" "$(DEPDIR)/console_redirect.Po"; else rm -f "$(DEPDIR)/console_redirect.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../console_redirect.c' object='console_redirect.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o console_redirect.obj `if test -f '$(srcdir)/../console_redirect.c'; then $(CYGPATH_W) '$(srcdir)/../console_redirect.c'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/../console_redirect.c'; fi` +uninstall-info-am: +install-launchagentsDATA: $(launchagents_DATA) + @$(NORMAL_INSTALL) + test -z "$(launchagentsdir)" || $(mkdir_p) "$(DESTDIR)$(launchagentsdir)" + @list='$(launchagents_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(launchagentsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(launchagentsdir)/$$f'"; \ + $(launchagentsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(launchagentsdir)/$$f"; \ + done + +uninstall-launchagentsDATA: + @$(NORMAL_UNINSTALL) + @list='$(launchagents_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(launchagentsdir)/$$f'"; \ + rm -f "$(DESTDIR)$(launchagentsdir)/$$f"; \ + done + +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: check-am +all-am: Makefile $(PROGRAMS) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(xinitrcdir)" "$(DESTDIR)$(launchagentsdir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic 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-launchagentsDATA 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-launchagentsDATA \ + 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-launchagentsDATA install-man \ + 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-launchagentsDATA \ + uninstall-xinitrcPROGRAMS + + +.cpp: + $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ + +$(bundleidprefix).startx.plist.cpp: startx.plist.cpp + cp $< $@ +# 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/launchd/user_startx/launchd_startx.c b/app/xinit/launchd/user_startx/launchd_startx.c new file mode 100644 index 000000000..e3fae76b8 --- /dev/null +++ b/app/xinit/launchd/user_startx/launchd_startx.c @@ -0,0 +1,64 @@ +/* Copyright (c) 2011 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. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include <asl.h> +#include <unistd.h> +#include <stdio.h> +#include <assert.h> +#include <spawn.h> +#include <sys/wait.h> +#include <string.h> +#include <stdlib.h> + +#include "console_redirect.h" + +int main(int argc, char **argv, char **envp) { + aslclient aslc; + pid_t child; + int pstat; + + if(argc < 2 || strcmp(argv[1], "--help") == 0) { + fprintf(stderr, "Usage: %s prog [args...]\n", argv[0]); + exit(EXIT_FAILURE); + } + + aslc = asl_open(BUNDLE_ID_PREFIX".startx", BUNDLE_ID_PREFIX, ASL_OPT_NO_DELAY); + + xi_asl_capture_fd(aslc, NULL, ASL_LEVEL_INFO, STDOUT_FILENO); + xi_asl_capture_fd(aslc, NULL, ASL_LEVEL_NOTICE, STDERR_FILENO); + + assert(posix_spawnp(&child, argv[1], NULL, NULL, &argv[1], envp) == 0); + + wait4(child, &pstat, 0, (struct rusage *)0); + + return pstat; +} diff --git a/app/xinit/org.x.startx.plist.cpp b/app/xinit/launchd/user_startx/startx.plist.cpp index bd4c9e9a8..9d9c1a454 100644 --- a/app/xinit/org.x.startx.plist.cpp +++ b/app/xinit/launchd/user_startx/startx.plist.cpp @@ -3,14 +3,15 @@ <plist version="1.0"> <dict> <key>Label</key> - <string>LAUNCHD_ID_PREFIX.startx</string> + <string>BUNDLE_ID_PREFIX.startx</string> <key>ProgramArguments</key> <array> + <string>__xinitrcdir__/launchd_startx</string> <string>__bindir__/startx</string> </array> <key>Sockets</key> <dict> - <key>LAUNCHD_ID_PREFIX:0</key> + <key>BUNDLE_ID_PREFIX:0</key> <dict> <key>SecureSocketWithKey</key> <string>DISPLAY</string> diff --git a/app/xinit/man/Makefile.am b/app/xinit/man/Makefile.am new file mode 100644 index 000000000..074bc3619 --- /dev/null +++ b/app/xinit/man/Makefile.am @@ -0,0 +1,20 @@ + +appmandir = $(APP_MAN_DIR) +appman_PRE = startx.man xinit.man +appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX)) + +EXTRA_DIST = $(appman_PRE) +CLEANFILES = $(appman_DATA) +SUFFIXES = .$(APP_MAN_SUFFIX) .man + +MAN_SUBSTS+= -e 's|__XSERVERNAME__|$(XSERVERNAME)|g' \ + -e 's|__XCONFIGFILE__|$(XCONFIGFILE)|g' \ + -e 's|__XCONFIGFILEMAN__|$(XCONFIGFILEMAN)|g' \ + -e 's|__xinitdir__|$(XINITDIR)|g' \ + -e 's|__bindir__|$(bindir)|g' \ + -e 's|__libdir__|$(libdir)|g' \ + -e 's|__SCOMAN__|$(SCOMAN)|g' + +# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure +.man.$(APP_MAN_SUFFIX): + $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ diff --git a/app/xinit/man/Makefile.in b/app/xinit/man/Makefile.in new file mode 100644 index 000000000..229a465d8 --- /dev/null +++ b/app/xinit/man/Makefile.in @@ -0,0 +1,389 @@ +# 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@ + +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 = ${SHELL} $(install_sh) -c -m 644 +install_sh_PROGRAM = ${SHELL} $(install_sh) -c +install_sh_SCRIPT = ${SHELL} $(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@ +subdir = man +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_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|^.*/||'`; +am__installdirs = "$(DESTDIR)$(appmandir)" +appmanDATA_INSTALL = $(INSTALL_DATA) +DATA = $(appman_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GREP = @GREP@ +INSTALL_CMD = @INSTALL_CMD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +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@ +MAN_SUBSTS = @MAN_SUBSTS@ -e 's|__XSERVERNAME__|$(XSERVERNAME)|g' -e \ + 's|__XCONFIGFILE__|$(XCONFIGFILE)|g' -e \ + 's|__XCONFIGFILEMAN__|$(XCONFIGFILEMAN)|g' -e \ + 's|__xinitdir__|$(XINITDIR)|g' -e 's|__bindir__|$(bindir)|g' \ + -e 's|__libdir__|$(libdir)|g' -e 's|__SCOMAN__|$(SCOMAN)|g' +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@ +SCOMAN = @SCOMAN@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHELL_CMD = @SHELL_CMD@ +STARTX_COOKIE_FLAGS = @STARTX_COOKIE_FLAGS@ +STRICT_CFLAGS = @STRICT_CFLAGS@ +STRIP = @STRIP@ +TIGER_LAUNCHD_FALSE = @TIGER_LAUNCHD_FALSE@ +TIGER_LAUNCHD_TRUE = @TIGER_LAUNCHD_TRUE@ +TWM = @TWM@ +VERSION = @VERSION@ +WM = @WM@ +XAUTH = @XAUTH@ +XCLOCK = @XCLOCK@ +XCONFIGFILE = @XCONFIGFILE@ +XCONFIGFILEMAN = @XCONFIGFILEMAN@ +XCONSOLE = @XCONSOLE@ +XINIT = @XINIT@ +XINITDIR = @XINITDIR@ +XINIT_CFLAGS = @XINIT_CFLAGS@ +XINIT_LIBS = @XINIT_LIBS@ +XMODMAP = @XMODMAP@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +XRDB = @XRDB@ +XSERVER = @XSERVER@ +XSERVERNAME = @XSERVERNAME@ +XTERM = @XTERM@ +ac_ct_CC = @ac_ct_CC@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +bundleidprefix = @bundleidprefix@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +launchagentsdir = @launchagentsdir@ +launchdaemonsdir = @launchdaemonsdir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +appmandir = $(APP_MAN_DIR) +appman_PRE = startx.man xinit.man +appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX)) +EXTRA_DIST = $(appman_PRE) +CLEANFILES = $(appman_DATA) +SUFFIXES = .$(APP_MAN_SUFFIX) .man +all: all-am + +.SUFFIXES: +.SUFFIXES: .$(APP_MAN_SUFFIX) .man +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign man/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +uninstall-info-am: +install-appmanDATA: $(appman_DATA) + @$(NORMAL_INSTALL) + test -z "$(appmandir)" || $(mkdir_p) "$(DESTDIR)$(appmandir)" + @list='$(appman_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(appmanDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appmandir)/$$f'"; \ + $(appmanDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appmandir)/$$f"; \ + done + +uninstall-appmanDATA: + @$(NORMAL_UNINSTALL) + @list='$(appman_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(appmandir)/$$f'"; \ + rm -f "$(DESTDIR)$(appmandir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(appmandir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-appmanDATA + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-appmanDATA uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic distclean \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-appmanDATA install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am uninstall uninstall-am uninstall-appmanDATA \ + uninstall-info-am + + +# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure +.man.$(APP_MAN_SUFFIX): + $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ +# 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/startx.man b/app/xinit/man/startx.man index a4dede0a7..0405be0db 100644 --- a/app/xinit/startx.man +++ b/app/xinit/man/startx.man @@ -1,6 +1,6 @@ .\" .\" Copyright 1993, 1998 The Open Group -.\" +.\" .\" Permission to use, copy, modify, distribute, and sell this software and its .\" documentation for any purpose is hereby granted without fee, provided that .\" the above copyright notice appear in all copies and that both that @@ -74,7 +74,7 @@ startx -- -dpi 100 .PP startx -- -layout Multihead .RE -#ifdef __SCOMAN__ +.if '__SCOMAN__'' .ig .PP To determine the client to run, .B startx @@ -90,7 +90,8 @@ looks for the following files, in order: .I __xinitdir__/xinitrc .RE .PP -#else +.. +.if !'x.__SCOMAN__'x.' .ig .PP To determine the client to run, .B startx @@ -102,7 +103,7 @@ the file in the .I xinit library directory. -#endif +.. If command line client options are given, they override this behavior and revert to the .BR xinit (__appmansuffix__) @@ -186,7 +187,7 @@ and .IR Xsecurity (__miscmansuffix__) manual pages for more information on X client/server authentication. .SH FILES -#ifdef __SCOMAN__ +.if '__SCOMAN__'' .ig .TP 25 .I $(HOME)/.startxrc Client to run. Typically a shell script which runs many programs in @@ -196,7 +197,7 @@ the background. Client to use if the user has no .I .startxrc file. -#endif +.. .TP 25 .I $(HOME)/.xinitrc Client to run. Typically a shell script which runs many programs in diff --git a/app/xinit/xinit.man b/app/xinit/man/xinit.man index 31b93aab5..31b93aab5 100644 --- a/app/xinit/xinit.man +++ b/app/xinit/man/xinit.man diff --git a/app/xinit/startx.cpp b/app/xinit/startx.cpp index f055ad9f6..9f6561d95 100644 --- a/app/xinit/startx.cpp +++ b/app/xinit/startx.cpp @@ -5,8 +5,8 @@ XCOMM This is just a sample implementation of a slightly less primitive XCOMM interface than xinit. It looks for user .xinitrc and .xserverrc XCOMM files, then system xinitrc and xserverrc files, else lets xinit choose XCOMM its default. The system xinitrc should probably do things like check -XCOMM for .Xresources files and merge them in, startup up a window manager, -XCOMM and pop a clock and serveral xterms. +XCOMM for .Xresources files and merge them in, start up a window manager, +XCOMM and pop a clock and several xterms. XCOMM XCOMM Site administrators are STRONGLY urged to write nicer versions. XCOMM @@ -21,7 +21,7 @@ XCOMM This allows startx to be placed in a place like /usr/bin or /usr/local/bin XCOMM and people may use X without changing their PATH. XCOMM Note that we put our own bin directory at the front of the path, and XCOMM the standard system path at the back, since if you are using the Xorg -XCOMM server theres a pretty good chance you want to bias the Xorg clients +XCOMM server there's a pretty good chance you want to bias the Xorg clients XCOMM over the old system's clients. XCOMM First our compiled path @@ -83,7 +83,7 @@ serverargs="" #ifdef __APPLE__ if [ "x$X11_PREFS_DOMAIN" = x ] ; then - export X11_PREFS_DOMAIN=LAUNCHD_ID_PREFIX".X11" + export X11_PREFS_DOMAIN=BUNDLE_ID_PREFIX".X11" fi XCOMM Initialize defaults (this will cut down on "safe" error messages) diff --git a/app/xinit/xinit.c b/app/xinit/xinit.c index dd4e0a281..5a458705f 100644 --- a/app/xinit/xinit.c +++ b/app/xinit/xinit.c @@ -380,9 +380,8 @@ processTimeout(int timeout, char *string) else fprintf(stderr, "."); fflush(stderr); - } - if (timeout) sleep(1); + } if (++i > timeout) break; } @@ -620,7 +619,7 @@ shutdown(void) if (!processTimeout(10, "X server to shut down")) return; - Errorx("X server slow to shut down, senging KILL signal"); + Errorx("X server slow to shut down, sending KILL signal"); if (killpg(serverpid, SIGKILL) < 0) { if (errno == ESRCH) |