diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2013-09-14 09:16:27 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2013-09-14 09:16:27 +0000 |
commit | b6d45f75e658a866f3f708ae182c23fc742d38eb (patch) | |
tree | 9f299d9b18b3df1be202edd535bb1c01a5110ed6 /app | |
parent | 9f354802375e605e51f086e833a570df1993271a (diff) |
Update to xinit 1.3.3
Diffstat (limited to 'app')
-rw-r--r-- | app/xinit/COPYING | 52 | ||||
-rw-r--r-- | app/xinit/ChangeLog | 206 | ||||
-rw-r--r-- | app/xinit/Makefile.bsd-wrapper | 4 | ||||
-rw-r--r-- | app/xinit/Makefile.in | 8 | ||||
-rw-r--r-- | app/xinit/aclocal.m4 | 118 | ||||
-rw-r--r-- | app/xinit/compile | 347 | ||||
-rw-r--r-- | app/xinit/configure | 565 | ||||
-rw-r--r-- | app/xinit/configure.ac | 33 | ||||
-rw-r--r-- | app/xinit/cpprules.in | 1 | ||||
-rw-r--r-- | app/xinit/launchd/Makefile.am | 7 | ||||
-rw-r--r-- | app/xinit/launchd/Makefile.in | 8 | ||||
-rw-r--r-- | app/xinit/launchd/privileged_startx/10-tmpdirs.cpp | 34 | ||||
-rw-r--r-- | app/xinit/launchd/privileged_startx/Makefile.in | 4 | ||||
-rw-r--r-- | app/xinit/launchd/privileged_startx/privileged_startx.plist.cpp | 4 | ||||
-rw-r--r-- | app/xinit/launchd/privileged_startx/server.c | 14 | ||||
-rw-r--r-- | app/xinit/launchd/user_startx/Makefile.in | 4 | ||||
-rw-r--r-- | app/xinit/launchd/user_startx/launchd_startx.c | 23 | ||||
-rw-r--r-- | app/xinit/man/Makefile.am | 4 | ||||
-rw-r--r-- | app/xinit/man/Makefile.in | 6 | ||||
-rw-r--r-- | app/xinit/man/xinit.man | 6 | ||||
-rw-r--r-- | app/xinit/startx.cpp | 4 | ||||
-rw-r--r-- | app/xinit/xinit.c | 55 |
22 files changed, 1136 insertions, 371 deletions
diff --git a/app/xinit/COPYING b/app/xinit/COPYING index 7f33cbfd2..821341a5f 100644 --- a/app/xinit/COPYING +++ b/app/xinit/COPYING @@ -1,12 +1,48 @@ -This is a stub file. This package has not yet had its complete licensing -information compiled. Please see the individual source files for details on -your rights to use and modify this software. +Copyright 1986, 1988, 1993, 1998 The Open Group -Please submit updated COPYING files to the Xorg bugzilla: +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. -https://bugs.freedesktop.org/enter_bug.cgi?product=xorg +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -All licensing questions regarding this software should be directed at the -Xorg mailing list: +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -http://lists.freedesktop.org/mailman/listinfo/xorg +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright (c) 2008-2012 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. diff --git a/app/xinit/ChangeLog b/app/xinit/ChangeLog index c41d18877..807ec55e0 100644 --- a/app/xinit/ChangeLog +++ b/app/xinit/ChangeLog @@ -1,3 +1,209 @@ +commit cdc39fd28649ea906dea8f58981d15d4b04a0a47 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Sep 8 09:35:35 2013 -0700 + + xinit 1.3.3 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 2363f7ed1c7f838107c1209a97d103f72d980f99 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Sep 8 09:35:27 2013 -0700 + + Add Apple copyright/license notice from launchd files to COPYING + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 5250190bd436b5b762ebb57452d15dff5ae6a24a +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Aug 24 14:46:33 2013 -0700 + + Use pid_t instead of int for type of pids + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 14ea26b8dc0c601e445331e09a4cc9ca082a1345 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Aug 3 00:15:34 2013 -0700 + + Check for openssl as mkcookie fallback on all platforms, not just OpenBSD + + Configure will notify the builder which cookie maker it chooses, + so that packagers can add a dependency on the program needed. + + (Matthieu says the -hex flag to the openssl command was originally + OpenBSD-specific but has since been added in upstream OpenSSL.) + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Thomas Klausner <wiz@NetBSD.org> + Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> + +commit 09ab37f816d2fe9482574c825132d9b516b8e0bf +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Jul 18 22:58:10 2013 -0700 + + Declare processTimeout() as taking a const string arg + + Fixes gcc const warnings on every call to it + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 1dd71b4eae433896e41f8366f23b8269712b4cf3 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Jul 18 22:51:56 2013 -0700 + + If we have to forcibly kill the Xserver on Solaris, reset kbd_mode + + If the Xserver hangs when xinit is waiting for it to die, and xinit + sends a kill -9 to it, then it will leave the keyboard in a state that + can't be used on the text console, so fix it up ourselves. + + Upstreaming from Solaris, where it was originally implemented to fix + Sun bug 4221128 “If Xserver is slow to exit, xinit does "kill -9" and + kbd_mode -a is required” + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 79fd43329e15432bab4f9f8856af385ac2ac0417 +Author: Thomas Klausner <wiz@NetBSD.org> +Date: Thu Apr 4 14:58:30 2013 +0200 + + Use xinitrc.d/?*.sh as the matching pattern instead of needing a fragile sed substitution XSLASHGLOB to produce xinitrc.d/*.sh. (If that were used literally the slash-star would confuse cpp.) + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit ef3d1d64958c51d7716445574bb7e5653aab714d +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Feb 23 11:23:25 2013 -0800 + + Add printf attributes suggested by gcc + + Also moves existing noreturn attributes up to function prototypes for + functions with forward declarations. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 4e85bce64acef1fa0ddff04d59737444e942ff12 +Author: Egbert Eich <eich@freedesktop.org> +Date: Thu May 19 09:27:13 2011 +0200 + + install: Use sysconfdir instead of libdir for config files. + + Most X packages today install their config files in sysconfigdir, + only a few are left which still put their configuration in libdir. + + Signed-off-by: Egbert Eich <eich@freedesktop.org> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 7c2f87264db950dfecb1a5467d06b3d9d621e32c +Author: Egbert Eich <eich@freedesktop.org> +Date: Thu May 19 09:26:24 2011 +0200 + + man: Set correct config file location in man page + + Change the config file location from a hard coded path to what is + set during build. + + Signed-off-by: Egbert Eich <eich@freedesktop.org> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit fb4d46c9a85755910a222dcc7167df3b5a5c8d94 +Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com> +Date: Thu Sep 20 22:31:44 2012 -0700 + + privileged_startx: use root:wheel instead of 0:0 + + http://xquartz.macosforge.org/trac/ticket/637 + + Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> + +commit bfed997da5f083e3ddfbda440e114d1261d18b14 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Jul 24 08:47:29 2012 -0700 + + XQuartz: Fix an issue where -dpi was not being passed to the server despite being set + + For some reason 'defaults' sometimes shows dpi in quotes and sometimes + doesn't. + + Regression-from: 335937217a51e5e159a14463e0b1e3aedf35c6be + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 8156aad786754499f4636104aa5bd8a27a281448 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat May 19 04:34:32 2012 -0700 + + Annotate Fatal and Fatalx as _X_NORETURN + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 641588afe92c803a1231ecf6281115f55b20e62a +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat May 19 04:30:49 2012 -0700 + + laucnhd: Silence some syslog spam + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 335937217a51e5e159a14463e0b1e3aedf35c6be +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Sat May 19 04:22:14 2012 -0700 + + darwin: Silence a syslog message from defaults + + Unfortunately defaults has no way to check if a preference exists, and it + prints a message to syslog if we read one that doesn't exist. dpi is one + that commonly doesn't exist and results in user confusion when they read + syslog. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit eda973a32552c916e7e7cce8877674106cbda0cb +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Apr 18 10:02:07 2012 -0700 + + launchd: Fix the destination of moved-aside directories in privileged_startx + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit c781653f956043e0ee476d4e95e0ae93b27aff96 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Apr 18 09:52:18 2012 -0700 + + launchd: Load privileged_startx properly on Tiger + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 4cd122efcfa47afbe8c2ebeee6d8fd48914839a7 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Apr 18 09:47:33 2012 -0700 + + launchd: Provide more verbose error reporting for launchd checkin failures + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 2d9bdc819adbe45ec3ffdc72429fd92b7f613601 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Wed Apr 18 09:20:37 2012 -0700 + + launchd: Don't provide the LaunchAgent on Tiger + + Tiger's launchd doesn't support all the features we need from it. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + +commit 49cfa8b7253096d24b2ef6a8d0ba32c4bae9ac23 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Fri Feb 17 17:35:26 2012 -0800 + + launchd/privileged_startx: Improved error resolution + + Rather than just failing to do anything when directories aren't what we + want them to be, we now try our best to fix the situation. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + commit f5ef7a3f8c1e8ac3f715e4059bf3b9a03aafd5a7 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Fri Jan 27 23:13:48 2012 -0800 diff --git a/app/xinit/Makefile.bsd-wrapper b/app/xinit/Makefile.bsd-wrapper index b630af238..44678bf4d 100644 --- a/app/xinit/Makefile.bsd-wrapper +++ b/app/xinit/Makefile.bsd-wrapper @@ -1,5 +1,3 @@ -# $OpenBSD: Makefile.bsd-wrapper,v 1.4 2010/05/31 20:23:19 matthieu Exp $ - -CONFIGURE_ARGS= --with-xinitdir=/etc/X11/xinit +# $OpenBSD: Makefile.bsd-wrapper,v 1.5 2013/09/14 09:16:23 matthieu Exp $ .include <bsd.xorg.mk> diff --git a/app/xinit/Makefile.in b/app/xinit/Makefile.in index 765585703..115ca829c 100644 --- a/app/xinit/Makefile.in +++ b/app/xinit/Makefile.in @@ -84,8 +84,8 @@ host_triplet = @host@ bin_PROGRAMS = xinit$(EXEEXT) DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/configure $(top_srcdir)/cpprules.in AUTHORS \ - COPYING ChangeLog INSTALL NEWS config.guess config.sub depcomp \ + $(top_srcdir)/configure $(top_srcdir)/cpprules.in COPYING \ + ChangeLog INSTALL NEWS compile config.guess config.sub depcomp \ install-sh missing subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -280,6 +280,7 @@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ +OPENSSL = @OPENSSL@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -289,6 +290,8 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ SCOMAN = @SCOMAN@ @@ -384,7 +387,6 @@ CPP_SED_MAGIC = $(SED) -e '/^\# *[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 diff --git a/app/xinit/aclocal.m4 b/app/xinit/aclocal.m4 index 163f340ed..8e74e608c 100644 --- a/app/xinit/aclocal.m4 +++ b/app/xinit/aclocal.m4 @@ -20,6 +20,7 @@ If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. # @@ -46,8 +47,12 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl +m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi @@ -60,7 +65,6 @@ if test -n "$PKG_CONFIG"; then AC_MSG_RESULT([no]) PKG_CONFIG="" fi - fi[]dnl ])# PKG_PROG_PKG_CONFIG @@ -69,34 +73,32 @@ fi[]dnl # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # -# -# Similar to PKG_CHECK_MODULES, make sure that the first instance of -# this or PKG_CHECK_MODULES is called, or make sure to call -# PKG_CHECK_EXISTS manually +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +# only at the first occurence in configure.ac, so if the first place +# it's called might be skipped (such as if it is within an "if", you +# have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_ifval([$2], [$2], [:]) + m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) - # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], -[if test -n "$PKG_CONFIG"; then - if test -n "$$1"; then - pkg_cv_[]$1="$$1" - else - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - fi -else - pkg_failed=untried +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes ], + [pkg_failed=yes]) + else + pkg_failed=untried fi[]dnl ])# _PKG_CONFIG @@ -138,16 +140,17 @@ and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then + AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - ifelse([$4], , [AC_MSG_ERROR(dnl + m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS @@ -155,28 +158,67 @@ $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -_PKG_TEXT -])], - [AC_MSG_RESULT([no]) - $4]) +_PKG_TEXT])[]dnl + ]) elif test $pkg_failed = untried; then - ifelse([$4], , [AC_MSG_FAILURE(dnl + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT -To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], - [$4]) +To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl + ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) - ifelse([$3], , :, [$3]) + $3 fi[]dnl ])# PKG_CHECK_MODULES + +# PKG_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable pkgconfigdir as the location where a module +# should install pkg-config .pc files. By default the directory is +# $libdir/pkgconfig, but the default can be changed by passing +# DIRECTORY. The user can override through the --with-pkgconfigdir +# parameter. +AC_DEFUN([PKG_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([pkgconfigdir], + [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, + [with_pkgconfigdir=]pkg_default) +AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_INSTALLDIR + + +# PKG_NOARCH_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable noarch_pkgconfigdir as the location where a +# module should install arch-independent pkg-config .pc files. By +# default the directory is $datadir/pkgconfig, but the default can be +# changed by passing DIRECTORY. The user can override through the +# --with-noarch-pkgconfigdir parameter. +AC_DEFUN([PKG_NOARCH_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([noarch-pkgconfigdir], + [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, + [with_noarch_pkgconfigdir=]pkg_default) +AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_NOARCH_INSTALLDIR + # Copyright (C) 2002-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation @@ -1201,7 +1243,7 @@ AC_SUBST([am__untar]) dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. -dnl +dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the "Software"), dnl to deal in the Software without restriction, including without limitation @@ -1234,10 +1276,10 @@ dnl DEALINGS IN THE SOFTWARE. # [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) # # -# See the "minimum version" comment for each macro you use to see what +# 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.16.2]) +m4_define([vers_have], [1.17.1]) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_if(m4_cmp(maj_have, maj_needed), 0,, @@ -1257,7 +1299,7 @@ m4_undefine([maj_needed]) # such as man pages and config files AC_DEFUN([XORG_PROG_RAWCPP],[ AC_REQUIRE([AC_PROG_CPP]) -AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], +AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) # Check for flag to avoid builtin definitions - assumes unix is predefined, @@ -2743,18 +2785,18 @@ fi found="no" m4_foreach([flag], m4_cdr($@), [ if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" fi PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname - AC_MSG_CHECKING([if ]COMPILER[ supports]flag[]) + AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) AC_CACHE_VAL($cacheid, [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], @@ -3013,7 +3055,7 @@ dnl # XORG_RELEASE_VERSION # -------------------- # Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. - + AC_DEFUN([XORG_RELEASE_VERSION],[ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], [`echo $PACKAGE_VERSION | cut -d . -f 1`], diff --git a/app/xinit/compile b/app/xinit/compile new file mode 100644 index 000000000..531136b06 --- /dev/null +++ b/app/xinit/compile @@ -0,0 +1,347 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2012-10-14.11; # UTC + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Written by Tom Tromey <tromey@cygnus.com>. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to <bug-automake@gnu.org> or send patches to +# <automake-patches@gnu.org>. + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to <bug-automake@gnu.org>. +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/app/xinit/configure b/app/xinit/configure index 675090a04..8fc43f12c 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.69 for xinit 1.3.2. +# Generated by GNU Autoconf 2.69 for xinit 1.3.3. # # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. # @@ -581,8 +581,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='xinit' PACKAGE_TARNAME='xinit' -PACKAGE_VERSION='1.3.2' -PACKAGE_STRING='xinit 1.3.2' +PACKAGE_VERSION='1.3.3' +PACKAGE_STRING='xinit 1.3.3' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' PACKAGE_URL='' @@ -644,6 +644,7 @@ XSERVERNAME SCOMAN SHELL_CMD STARTX_COOKIE_FLAGS +OPENSSL MCOOKIE XINIT_LIBS XINIT_CFLAGS @@ -688,6 +689,8 @@ build_vendor build_cpu build INSTALL_CMD +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH PKG_CONFIG CHANGELOG_CMD STRICT_CFLAGS @@ -813,6 +816,8 @@ LIBS CPPFLAGS CPP PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR XINIT_CFLAGS XINIT_LIBS' @@ -1355,7 +1360,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.2 to adapt to many kinds of systems. +\`configure' configures xinit 1.3.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1425,7 +1430,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xinit 1.3.2:";; + short | recursive ) echo "Configuration of xinit 1.3.3:";; esac cat <<\_ACEOF @@ -1492,6 +1497,10 @@ Some influential environment variables: you have headers in a nonstandard directory <include dir> CPP C preprocessor PKG_CONFIG path to pkg-config utility + PKG_CONFIG_PATH + directories to add to pkg-config's search path + PKG_CONFIG_LIBDIR + path overriding pkg-config's built-in search path XINIT_CFLAGS C compiler flags for XINIT, overriding pkg-config XINIT_LIBS linker flags for XINIT, overriding pkg-config @@ -1562,7 +1571,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xinit configure 1.3.2 +xinit configure 1.3.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1886,7 +1895,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.2, which was +It was created by xinit $as_me 1.3.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2715,7 +2724,7 @@ fi # Define the identity of the package. PACKAGE='xinit' - VERSION='1.3.2' + VERSION='1.3.3' cat >>confdefs.h <<_ACEOF @@ -4380,6 +4389,11 @@ 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. @@ -4492,7 +4506,6 @@ $as_echo "yes" >&6; } $as_echo "no" >&6; } PKG_CONFIG="" fi - fi # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || @@ -4727,18 +4740,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wall" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wall" >&5 -$as_echo_n "checking if $CC supports-Wall... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wall" >&5 +$as_echo_n "checking if $CC supports -Wall... " >&6; } cacheid=xorg_cv_cc_flag__Wall if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -4845,18 +4858,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wpointer-arith" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wpointer-arith" >&5 -$as_echo_n "checking if $CC supports-Wpointer-arith... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-arith" >&5 +$as_echo_n "checking if $CC supports -Wpointer-arith... " >&6; } cacheid=xorg_cv_cc_flag__Wpointer_arith if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -4963,18 +4976,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-declarations" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wmissing-declarations" >&5 -$as_echo_n "checking if $CC supports-Wmissing-declarations... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-declarations" >&5 +$as_echo_n "checking if $CC supports -Wmissing-declarations... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_declarations if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -5081,18 +5094,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wformat=2" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wformat=2" >&5 -$as_echo_n "checking if $CC supports-Wformat=2... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat=2" >&5 +$as_echo_n "checking if $CC supports -Wformat=2... " >&6; } cacheid=xorg_cv_cc_flag__Wformat_2 if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -5130,18 +5143,18 @@ $as_echo "$supported" >&6; } fi if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wformat" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wformat" >&5 -$as_echo_n "checking if $CC supports-Wformat... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat" >&5 +$as_echo_n "checking if $CC supports -Wformat... " >&6; } cacheid=xorg_cv_cc_flag__Wformat if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -5250,18 +5263,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wstrict-prototypes" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wstrict-prototypes" >&5 -$as_echo_n "checking if $CC supports-Wstrict-prototypes... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wstrict-prototypes" >&5 +$as_echo_n "checking if $CC supports -Wstrict-prototypes... " >&6; } cacheid=xorg_cv_cc_flag__Wstrict_prototypes if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -5368,18 +5381,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-prototypes" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wmissing-prototypes" >&5 -$as_echo_n "checking if $CC supports-Wmissing-prototypes... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-prototypes" >&5 +$as_echo_n "checking if $CC supports -Wmissing-prototypes... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_prototypes if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -5486,18 +5499,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wnested-externs" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wnested-externs" >&5 -$as_echo_n "checking if $CC supports-Wnested-externs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnested-externs" >&5 +$as_echo_n "checking if $CC supports -Wnested-externs... " >&6; } cacheid=xorg_cv_cc_flag__Wnested_externs if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -5604,18 +5617,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wbad-function-cast" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wbad-function-cast" >&5 -$as_echo_n "checking if $CC supports-Wbad-function-cast... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wbad-function-cast" >&5 +$as_echo_n "checking if $CC supports -Wbad-function-cast... " >&6; } cacheid=xorg_cv_cc_flag__Wbad_function_cast if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -5722,18 +5735,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wold-style-definition" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wold-style-definition" >&5 -$as_echo_n "checking if $CC supports-Wold-style-definition... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wold-style-definition" >&5 +$as_echo_n "checking if $CC supports -Wold-style-definition... " >&6; } cacheid=xorg_cv_cc_flag__Wold_style_definition if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -5840,18 +5853,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wdeclaration-after-statement" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wdeclaration-after-statement" >&5 -$as_echo_n "checking if $CC supports-Wdeclaration-after-statement... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wdeclaration-after-statement" >&5 +$as_echo_n "checking if $CC supports -Wdeclaration-after-statement... " >&6; } cacheid=xorg_cv_cc_flag__Wdeclaration_after_statement if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -5962,18 +5975,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wunused" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wunused" >&5 -$as_echo_n "checking if $CC supports-Wunused... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wunused" >&5 +$as_echo_n "checking if $CC supports -Wunused... " >&6; } cacheid=xorg_cv_cc_flag__Wunused if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -6080,18 +6093,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wuninitialized" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wuninitialized" >&5 -$as_echo_n "checking if $CC supports-Wuninitialized... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wuninitialized" >&5 +$as_echo_n "checking if $CC supports -Wuninitialized... " >&6; } cacheid=xorg_cv_cc_flag__Wuninitialized if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -6198,18 +6211,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wshadow" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wshadow" >&5 -$as_echo_n "checking if $CC supports-Wshadow... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wshadow" >&5 +$as_echo_n "checking if $CC supports -Wshadow... " >&6; } cacheid=xorg_cv_cc_flag__Wshadow if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -6316,18 +6329,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wcast-qual" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wcast-qual" >&5 -$as_echo_n "checking if $CC supports-Wcast-qual... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wcast-qual" >&5 +$as_echo_n "checking if $CC supports -Wcast-qual... " >&6; } cacheid=xorg_cv_cc_flag__Wcast_qual if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -6434,18 +6447,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-noreturn" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wmissing-noreturn" >&5 -$as_echo_n "checking if $CC supports-Wmissing-noreturn... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-noreturn" >&5 +$as_echo_n "checking if $CC supports -Wmissing-noreturn... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_noreturn if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -6552,18 +6565,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-format-attribute" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wmissing-format-attribute" >&5 -$as_echo_n "checking if $CC supports-Wmissing-format-attribute... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-format-attribute" >&5 +$as_echo_n "checking if $CC supports -Wmissing-format-attribute... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_format_attribute if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -6682,18 +6695,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=implicit" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=implicit" >&5 -$as_echo_n "checking if $CC supports-Werror=implicit... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=implicit" >&5 +$as_echo_n "checking if $CC supports -Werror=implicit... " >&6; } cacheid=xorg_cv_cc_flag__Werror_implicit if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -6731,18 +6744,18 @@ $as_echo "$supported" >&6; } fi if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" >&5 -$as_echo_n "checking if $CC supports-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" >&5 +$as_echo_n "checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED... " >&6; } cacheid=xorg_cv_cc_flag__errwarn_E_NO_EXPLICIT_TYPE_GIVEN__errwarn_E_NO_IMPLICIT_DECL_ALLOWED if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -6849,18 +6862,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=nonnull" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=nonnull" >&5 -$as_echo_n "checking if $CC supports-Werror=nonnull... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=nonnull" >&5 +$as_echo_n "checking if $CC supports -Werror=nonnull... " >&6; } cacheid=xorg_cv_cc_flag__Werror_nonnull if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -6967,18 +6980,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=init-self" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=init-self" >&5 -$as_echo_n "checking if $CC supports-Werror=init-self... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=init-self" >&5 +$as_echo_n "checking if $CC supports -Werror=init-self... " >&6; } cacheid=xorg_cv_cc_flag__Werror_init_self if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -7085,18 +7098,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=main" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=main" >&5 -$as_echo_n "checking if $CC supports-Werror=main... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=main" >&5 +$as_echo_n "checking if $CC supports -Werror=main... " >&6; } cacheid=xorg_cv_cc_flag__Werror_main if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -7203,18 +7216,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=missing-braces" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=missing-braces" >&5 -$as_echo_n "checking if $CC supports-Werror=missing-braces... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=missing-braces" >&5 +$as_echo_n "checking if $CC supports -Werror=missing-braces... " >&6; } cacheid=xorg_cv_cc_flag__Werror_missing_braces if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -7321,18 +7334,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=sequence-point" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=sequence-point" >&5 -$as_echo_n "checking if $CC supports-Werror=sequence-point... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=sequence-point" >&5 +$as_echo_n "checking if $CC supports -Werror=sequence-point... " >&6; } cacheid=xorg_cv_cc_flag__Werror_sequence_point if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -7439,18 +7452,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=return-type" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=return-type" >&5 -$as_echo_n "checking if $CC supports-Werror=return-type... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=return-type" >&5 +$as_echo_n "checking if $CC supports -Werror=return-type... " >&6; } cacheid=xorg_cv_cc_flag__Werror_return_type if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -7488,18 +7501,18 @@ $as_echo "$supported" >&6; } fi if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-errwarn=E_FUNC_HAS_NO_RETURN_STMT" >&5 -$as_echo_n "checking if $CC supports-errwarn=E_FUNC_HAS_NO_RETURN_STMT... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT" >&5 +$as_echo_n "checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT... " >&6; } cacheid=xorg_cv_cc_flag__errwarn_E_FUNC_HAS_NO_RETURN_STMT if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -7606,18 +7619,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=trigraphs" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=trigraphs" >&5 -$as_echo_n "checking if $CC supports-Werror=trigraphs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=trigraphs" >&5 +$as_echo_n "checking if $CC supports -Werror=trigraphs... " >&6; } cacheid=xorg_cv_cc_flag__Werror_trigraphs if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -7724,18 +7737,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=array-bounds" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=array-bounds" >&5 -$as_echo_n "checking if $CC supports-Werror=array-bounds... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=array-bounds" >&5 +$as_echo_n "checking if $CC supports -Werror=array-bounds... " >&6; } cacheid=xorg_cv_cc_flag__Werror_array_bounds if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -7842,18 +7855,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=write-strings" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=write-strings" >&5 -$as_echo_n "checking if $CC supports-Werror=write-strings... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=write-strings" >&5 +$as_echo_n "checking if $CC supports -Werror=write-strings... " >&6; } cacheid=xorg_cv_cc_flag__Werror_write_strings if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -7960,18 +7973,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=address" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=address" >&5 -$as_echo_n "checking if $CC supports-Werror=address... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=address" >&5 +$as_echo_n "checking if $CC supports -Werror=address... " >&6; } cacheid=xorg_cv_cc_flag__Werror_address if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -8078,18 +8091,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=int-to-pointer-cast" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=int-to-pointer-cast" >&5 -$as_echo_n "checking if $CC supports-Werror=int-to-pointer-cast... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=int-to-pointer-cast" >&5 +$as_echo_n "checking if $CC supports -Werror=int-to-pointer-cast... " >&6; } cacheid=xorg_cv_cc_flag__Werror_int_to_pointer_cast if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -8127,18 +8140,18 @@ $as_echo "$supported" >&6; } fi if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-errwarn=E_BAD_PTR_INT_COMBINATION" >&5 -$as_echo_n "checking if $CC supports-errwarn=E_BAD_PTR_INT_COMBINATION... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION" >&5 +$as_echo_n "checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION... " >&6; } cacheid=xorg_cv_cc_flag__errwarn_E_BAD_PTR_INT_COMBINATION if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -8245,18 +8258,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=pointer-to-int-cast" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=pointer-to-int-cast" >&5 -$as_echo_n "checking if $CC supports-Werror=pointer-to-int-cast... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=pointer-to-int-cast" >&5 +$as_echo_n "checking if $CC supports -Werror=pointer-to-int-cast... " >&6; } cacheid=xorg_cv_cc_flag__Werror_pointer_to_int_cast if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -8366,18 +8379,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wimplicit" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wimplicit" >&5 -$as_echo_n "checking if $CC supports-Wimplicit... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wimplicit" >&5 +$as_echo_n "checking if $CC supports -Wimplicit... " >&6; } cacheid=xorg_cv_cc_flag__Wimplicit if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -8484,18 +8497,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wnonnull" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wnonnull" >&5 -$as_echo_n "checking if $CC supports-Wnonnull... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnonnull" >&5 +$as_echo_n "checking if $CC supports -Wnonnull... " >&6; } cacheid=xorg_cv_cc_flag__Wnonnull if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -8602,18 +8615,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Winit-self" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Winit-self" >&5 -$as_echo_n "checking if $CC supports-Winit-self... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Winit-self" >&5 +$as_echo_n "checking if $CC supports -Winit-self... " >&6; } cacheid=xorg_cv_cc_flag__Winit_self if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -8720,18 +8733,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmain" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wmain" >&5 -$as_echo_n "checking if $CC supports-Wmain... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmain" >&5 +$as_echo_n "checking if $CC supports -Wmain... " >&6; } cacheid=xorg_cv_cc_flag__Wmain if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -8838,18 +8851,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-braces" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wmissing-braces" >&5 -$as_echo_n "checking if $CC supports-Wmissing-braces... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-braces" >&5 +$as_echo_n "checking if $CC supports -Wmissing-braces... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_braces if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -8956,18 +8969,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wsequence-point" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wsequence-point" >&5 -$as_echo_n "checking if $CC supports-Wsequence-point... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wsequence-point" >&5 +$as_echo_n "checking if $CC supports -Wsequence-point... " >&6; } cacheid=xorg_cv_cc_flag__Wsequence_point if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -9074,18 +9087,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wreturn-type" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wreturn-type" >&5 -$as_echo_n "checking if $CC supports-Wreturn-type... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wreturn-type" >&5 +$as_echo_n "checking if $CC supports -Wreturn-type... " >&6; } cacheid=xorg_cv_cc_flag__Wreturn_type if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -9192,18 +9205,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wtrigraphs" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wtrigraphs" >&5 -$as_echo_n "checking if $CC supports-Wtrigraphs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wtrigraphs" >&5 +$as_echo_n "checking if $CC supports -Wtrigraphs... " >&6; } cacheid=xorg_cv_cc_flag__Wtrigraphs if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -9310,18 +9323,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Warray-bounds" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Warray-bounds" >&5 -$as_echo_n "checking if $CC supports-Warray-bounds... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Warray-bounds" >&5 +$as_echo_n "checking if $CC supports -Warray-bounds... " >&6; } cacheid=xorg_cv_cc_flag__Warray_bounds if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -9428,18 +9441,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wwrite-strings" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wwrite-strings" >&5 -$as_echo_n "checking if $CC supports-Wwrite-strings... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wwrite-strings" >&5 +$as_echo_n "checking if $CC supports -Wwrite-strings... " >&6; } cacheid=xorg_cv_cc_flag__Wwrite_strings if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -9546,18 +9559,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Waddress" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Waddress" >&5 -$as_echo_n "checking if $CC supports-Waddress... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Waddress" >&5 +$as_echo_n "checking if $CC supports -Waddress... " >&6; } cacheid=xorg_cv_cc_flag__Waddress if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -9664,18 +9677,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wint-to-pointer-cast" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wint-to-pointer-cast" >&5 -$as_echo_n "checking if $CC supports-Wint-to-pointer-cast... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wint-to-pointer-cast" >&5 +$as_echo_n "checking if $CC supports -Wint-to-pointer-cast... " >&6; } cacheid=xorg_cv_cc_flag__Wint_to_pointer_cast if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -9782,18 +9795,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wpointer-to-int-cast" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wpointer-to-int-cast" >&5 -$as_echo_n "checking if $CC supports-Wpointer-to-int-cast... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-to-int-cast" >&5 +$as_echo_n "checking if $CC supports -Wpointer-to-int-cast... " >&6; } cacheid=xorg_cv_cc_flag__Wpointer_to_int_cast if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -9933,18 +9946,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -pedantic" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-pedantic" >&5 -$as_echo_n "checking if $CC supports-pedantic... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -pedantic" >&5 +$as_echo_n "checking if $CC supports -pedantic... " >&6; } cacheid=xorg_cv_cc_flag__pedantic if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -10051,18 +10064,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror" >&5 -$as_echo_n "checking if $CC supports-Werror... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror" >&5 +$as_echo_n "checking if $CC supports -Werror... " >&6; } cacheid=xorg_cv_cc_flag__Werror if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -10100,18 +10113,18 @@ $as_echo "$supported" >&6; } fi if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -errwarn" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-errwarn" >&5 -$as_echo_n "checking if $CC supports-errwarn... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn" >&5 +$as_echo_n "checking if $CC supports -errwarn... " >&6; } cacheid=xorg_cv_cc_flag__errwarn if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -10221,18 +10234,18 @@ fi found="no" if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=attributes" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=attributes" >&5 -$as_echo_n "checking if $CC supports-Werror=attributes... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=attributes" >&5 +$as_echo_n "checking if $CC supports -Werror=attributes... " >&6; } cacheid=xorg_cv_cc_flag__Werror_attributes if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 @@ -10563,7 +10576,7 @@ DEFAULT_XSERVER=${bindir}/X DEFAULT_XAUTH=xauth DEFAULT_XINIT=xinit DEFAULT_WM=fvwm -DEFAULT_XINITDIR=${libdir}/X11/xinit +DEFAULT_XINITDIR=${sysconfdir}/X11/xinit DEFAULT_XCONSOLE=xconsole @@ -10813,46 +10826,46 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINIT" >&5 $as_echo_n "checking for XINIT... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XINIT_CFLAGS"; then - pkg_cv_XINIT_CFLAGS="$XINIT_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 - ($PKG_CONFIG --exists --print-errors "x11") 2>&5 +if test -n "$XINIT_CFLAGS"; then + pkg_cv_XINIT_CFLAGS="$XINIT_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xproto >= 7.0.17\""; } >&5 + ($PKG_CONFIG --exists --print-errors "x11 xproto >= 7.0.17") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_XINIT_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null` + pkg_cv_XINIT_CFLAGS=`$PKG_CONFIG --cflags "x11 xproto >= 7.0.17" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XINIT_LIBS"; then - pkg_cv_XINIT_LIBS="$XINIT_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 - ($PKG_CONFIG --exists --print-errors "x11") 2>&5 +if test -n "$XINIT_LIBS"; then + pkg_cv_XINIT_LIBS="$XINIT_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xproto >= 7.0.17\""; } >&5 + ($PKG_CONFIG --exists --print-errors "x11 xproto >= 7.0.17") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_XINIT_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null` + pkg_cv_XINIT_LIBS=`$PKG_CONFIG --libs "x11 xproto >= 7.0.17" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -10860,14 +10873,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XINIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` + XINIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11 xproto >= 7.0.17" 2>&1` else - XINIT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + XINIT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11 xproto >= 7.0.17" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XINIT_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (x11) were not met: + as_fn_error $? "Package requirements (x11 xproto >= 7.0.17) were not met: $XINIT_PKG_ERRORS @@ -10876,9 +10889,10 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables XINIT_CFLAGS and XINIT_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 +See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it @@ -10889,14 +10903,14 @@ Alternatively, you may set the environment variables XINIT_CFLAGS and XINIT_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>. +To get pkg-config, see <http://pkg-config.freedesktop.org/>. See \`config.log' for more details" "$LINENO" 5; } else XINIT_CFLAGS=$pkg_cv_XINIT_CFLAGS XINIT_LIBS=$pkg_cv_XINIT_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - : + fi case $host_os in @@ -10954,17 +10968,72 @@ done test -n "$MCOOKIE" || MCOOKIE="$MCOOKIE" -case $host_os in - *openbsd*) - MCOOKIE='/usr/sbin/openssl rand -hex 16' - ;; - *solaris*) - MCOOKIE="/usr/bin/od -X -A n -N 16 /dev/urandom | /usr/bin/tr -d ' '" - ;; +# If mcookie not found, try openssl, else per-system fallbacks +if test "x$MCOOKIE" = x ; then + for ac_prog in openssl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_OPENSSL+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $OPENSSL in + [\\/]* | ?:[\\/]*) + ac_cv_path_OPENSSL="$OPENSSL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/bin:/usr/bin:/usr/sbin:/usr/lib:/usr/libexec:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_OPENSSL="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; esac +fi +OPENSSL=$ac_cv_path_OPENSSL +if test -n "$OPENSSL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5 +$as_echo "$OPENSSL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$OPENSSL" && break +done +test -n "$OPENSSL" || OPENSSL="$OPENSSL" + if test "x$OPENSSL" != x ; then + MCOOKIE="$OPENSSL rand -hex 16" + else + case $host_os in + *openbsd*) + MCOOKIE='/usr/sbin/openssl rand -hex 16' + ;; + *solaris*) + MCOOKIE="/usr/bin/od -X -A n -N 16 /dev/urandom | /usr/bin/tr -d ' '" + ;; + esac + fi +fi if test "x$MCOOKIE" != x ; then STARTX_COOKIE_FLAGS='-DHAS_COOKIE_MAKER -DMK_COOKIE="$(MCOOKIE)"' + { $as_echo "$as_me:${as_lineno-$LINENO}: startx will depend on \"$MCOOKIE\" to generate xauth cookies" >&5 +$as_echo "$as_me: startx will depend on \"$MCOOKIE\" to generate xauth cookies" >&6;} fi @@ -11558,7 +11627,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=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.2, which was +This file was extended by xinit $as_me 1.3.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -11624,7 +11693,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -xinit config.status 1.3.2 +xinit config.status 1.3.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/app/xinit/configure.ac b/app/xinit/configure.ac index 3fa7cd6a9..b4bafac4a 100644 --- a/app/xinit/configure.ac +++ b/app/xinit/configure.ac @@ -22,7 +22,7 @@ dnl Process this file with autoconf to create configure. # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([xinit], [1.3.2], +AC_INIT([xinit], [1.3.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xinit]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) @@ -51,7 +51,7 @@ DEFAULT_XSERVER=${bindir}/X DEFAULT_XAUTH=xauth DEFAULT_XINIT=xinit DEFAULT_WM=fvwm -DEFAULT_XINITDIR=${libdir}/X11/xinit +DEFAULT_XINITDIR=${sysconfdir}/X11/xinit DEFAULT_XCONSOLE=xconsole AC_ARG_WITH(xrdb, @@ -153,7 +153,7 @@ AM_CONDITIONAL(TIGER_LAUNCHD, [test "x$TIGER_LAUNCHD" = "xyes"]) AM_CONDITIONAL(LAUNCHAGENT_XSERVER, [test "x$launchagentxserver" != "xno"]) # Checks for pkg-config packages -PKG_CHECK_MODULES(XINIT, x11) +PKG_CHECK_MODULES(XINIT, x11 xproto >= 7.0.17) case $host_os in *bsd*) @@ -165,17 +165,26 @@ esac AC_PATH_PROGS(MCOOKIE, [mcookie], [$MCOOKIE], [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/local/bin]) -case $host_os in - *openbsd*) - MCOOKIE='/usr/sbin/openssl rand -hex 16' - ;; - *solaris*) - MCOOKIE="/usr/bin/od -X -A n -N 16 /dev/urandom | /usr/bin/tr -d ' '" - ;; -esac - +# If mcookie not found, try openssl, else per-system fallbacks +if test "x$MCOOKIE" = x ; then + AC_PATH_PROGS(OPENSSL, [openssl], [$OPENSSL], + [$PATH:/bin:/usr/bin:/usr/sbin:/usr/lib:/usr/libexec:/usr/local/bin]) + if test "x$OPENSSL" != x ; then + MCOOKIE="$OPENSSL rand -hex 16" + else + case $host_os in + *openbsd*) + MCOOKIE='/usr/sbin/openssl rand -hex 16' + ;; + *solaris*) + MCOOKIE="/usr/bin/od -X -A n -N 16 /dev/urandom | /usr/bin/tr -d ' '" + ;; + esac + fi +fi if test "x$MCOOKIE" != x ; then STARTX_COOKIE_FLAGS='-DHAS_COOKIE_MAKER -DMK_COOKIE="$(MCOOKIE)"' + AC_MSG_NOTICE([startx will depend on "$MCOOKIE" to generate xauth cookies]) fi AC_SUBST(STARTX_COOKIE_FLAGS) diff --git a/app/xinit/cpprules.in b/app/xinit/cpprules.in index 92a987d92..eaea42885 100644 --- a/app/xinit/cpprules.in +++ b/app/xinit/cpprules.in @@ -10,7 +10,6 @@ CPP_SED_MAGIC = $(SED) -e '/^\# *[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 diff --git a/app/xinit/launchd/Makefile.am b/app/xinit/launchd/Makefile.am index f8781ed54..0135b7fcf 100644 --- a/app/xinit/launchd/Makefile.am +++ b/app/xinit/launchd/Makefile.am @@ -1,3 +1,8 @@ -SUBDIRS = privileged_startx user_startx +DIST_SUBDIRS = privileged_startx user_startx +SUBDIRS = privileged_startx + +if !TIGER_LAUNCHD +SUBDIRS += user_startx +endif EXTRA_DIST = console_redirect.h diff --git a/app/xinit/launchd/Makefile.in b/app/xinit/launchd/Makefile.in index a1e44423b..5d87a4d7c 100644 --- a/app/xinit/launchd/Makefile.in +++ b/app/xinit/launchd/Makefile.in @@ -49,6 +49,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +@TIGER_LAUNCHD_FALSE@am__append_1 = user_startx subdir = launchd DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -92,7 +93,6 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ distdir ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -172,6 +172,7 @@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ +OPENSSL = @OPENSSL@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -181,6 +182,8 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ SCOMAN = @SCOMAN@ @@ -263,7 +266,8 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = privileged_startx user_startx +DIST_SUBDIRS = privileged_startx user_startx +SUBDIRS = privileged_startx $(am__append_1) EXTRA_DIST = console_redirect.h all: all-recursive diff --git a/app/xinit/launchd/privileged_startx/10-tmpdirs.cpp b/app/xinit/launchd/privileged_startx/10-tmpdirs.cpp index 8012597f9..4366696ab 100644 --- a/app/xinit/launchd/privileged_startx/10-tmpdirs.cpp +++ b/app/xinit/launchd/privileged_startx/10-tmpdirs.cpp @@ -1,5 +1,5 @@ XCOMM!/bin/sh -XCOMM Copyright (c) 2008 Apple Inc. +XCOMM Copyright (c) 2008-2012 Apple Inc. XCOMM XCOMM Permission is hereby granted, free of charge, to any person XCOMM obtaining a copy of this software and associated documentation files @@ -36,11 +36,33 @@ else MKTEMP=mktemp fi +STAT=/usr/bin/stat + for dir in /tmp/.ICE-unix /tmp/.X11-unix /tmp/.font-unix ; do - 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 + success=0 + for attempt in 1 2 3 4 5 ; do + check=`${STAT} -f '%#p %u %g' ${dir} 2> /dev/null` + if [ "${check}" = "041777 0 0" ] ; then + success=1 + break + elif [ -n "${check}" ] ; then + saved=$(${MKTEMP} -d ${dir}-XXXXXXXX) + mv ${dir} ${saved} + echo "${dir} exists but is insecure. It has been moved into ${saved}" >&2 + fi + + # Use mktemp rather than mkdir to avoid possible security issue + # if $dir exists and is a symlink (ie protect against a race + # against the above check) + if ${MKTEMP} -d ${dir} >& /dev/null ; then + chmod 1777 $dir + chown root:wheel $dir + success=1 + break + fi + done + + if [ "${success}" -eq 0 ] ; then + echo "Could not successfully create ${dir}" >&2 fi done diff --git a/app/xinit/launchd/privileged_startx/Makefile.in b/app/xinit/launchd/privileged_startx/Makefile.in index 35d3bf370..5c738b94c 100644 --- a/app/xinit/launchd/privileged_startx/Makefile.in +++ b/app/xinit/launchd/privileged_startx/Makefile.in @@ -234,6 +234,7 @@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ +OPENSSL = @OPENSSL@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -243,6 +244,8 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ SCOMAN = @SCOMAN@ @@ -330,7 +333,6 @@ CPP_SED_MAGIC = $(SED) -e '/^\# *[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 diff --git a/app/xinit/launchd/privileged_startx/privileged_startx.plist.cpp b/app/xinit/launchd/privileged_startx/privileged_startx.plist.cpp index 533fc32b2..e23e892a6 100644 --- a/app/xinit/launchd/privileged_startx/privileged_startx.plist.cpp +++ b/app/xinit/launchd/privileged_startx/privileged_startx.plist.cpp @@ -11,8 +11,12 @@ <string>SCRIPTDIR</string> </array> #ifdef TIGER_LAUNCHD + <key>RunAtLoad</key> + <true/> <key>KeepAlive</key> <true/> + <key>ServiceIPC</key> + <true/> #else <key>MachServices</key> <dict> diff --git a/app/xinit/launchd/privileged_startx/server.c b/app/xinit/launchd/privileged_startx/server.c index cfbb62311..a93cae3bc 100644 --- a/app/xinit/launchd/privileged_startx/server.c +++ b/app/xinit/launchd/privileged_startx/server.c @@ -125,9 +125,19 @@ int server_main(const char *dir) { aslclient aslc; checkin = launch_data_new_string(LAUNCH_KEY_CHECKIN); + if (!checkin) { + asl_log(NULL, NULL, ASL_LEVEL_ERR, "unable to create launchd checkin string"); + exit(EXIT_FAILURE); + } + config = launch_msg(checkin); - if (!config || launch_data_get_type(config) == LAUNCH_DATA_ERRNO) { - asl_log(NULL, NULL, ASL_LEVEL_ERR, "launchd checkin failed"); + if (!config) { + asl_log(NULL, NULL, ASL_LEVEL_ERR, "could not send a message to launchd"); + exit(EXIT_FAILURE); + } + + if (launch_data_get_type(config) == LAUNCH_DATA_ERRNO) { + asl_log(NULL, NULL, ASL_LEVEL_ERR, "launchd checkin failed eith error: %d %s", launch_data_get_errno(config), strerror(launch_data_get_errno(config))); exit(EXIT_FAILURE); } diff --git a/app/xinit/launchd/user_startx/Makefile.in b/app/xinit/launchd/user_startx/Makefile.in index 4eaa873e2..beaf9c44f 100644 --- a/app/xinit/launchd/user_startx/Makefile.in +++ b/app/xinit/launchd/user_startx/Makefile.in @@ -222,6 +222,7 @@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ +OPENSSL = @OPENSSL@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -231,6 +232,8 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ SCOMAN = @SCOMAN@ @@ -318,7 +321,6 @@ CPP_SED_MAGIC = $(SED) -e '/^\# *[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 diff --git a/app/xinit/launchd/user_startx/launchd_startx.c b/app/xinit/launchd/user_startx/launchd_startx.c index f83cd6140..67419a4b6 100644 --- a/app/xinit/launchd/user_startx/launchd_startx.c +++ b/app/xinit/launchd/user_startx/launchd_startx.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011 Apple Inc. +/* Copyright (c) 2011-2012 Apple Inc. * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation files @@ -37,15 +37,7 @@ #include <sys/wait.h> #include <string.h> #include <stdlib.h> - -/* Using MIN_REQUIRED instead of MAX_ALLOWED logic due to posix_spawn not - * being marked with availability macros until 10.7 - */ -#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 #include <spawn.h> -#else -#include <errno.h> -#endif #include "console_redirect.h" @@ -64,20 +56,7 @@ int main(int argc, char **argv, char **envp) { xi_asl_capture_fd(aslc, NULL, ASL_LEVEL_INFO, STDOUT_FILENO); xi_asl_capture_fd(aslc, NULL, ASL_LEVEL_NOTICE, STDERR_FILENO); -#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 assert(posix_spawnp(&child, argv[1], NULL, NULL, &argv[1], envp) == 0); -#else - switch(child = fork()) { - case -1: - perror("fork"); - return errno; - case 0: - return execvp(argv[1], &argv[1]); - default: - break; - } -#endif - wait4(child, &pstat, 0, (struct rusage *)0); return pstat; diff --git a/app/xinit/man/Makefile.am b/app/xinit/man/Makefile.am index 074bc3619..b24faca6b 100644 --- a/app/xinit/man/Makefile.am +++ b/app/xinit/man/Makefile.am @@ -13,7 +13,9 @@ MAN_SUBSTS+= -e 's|__XSERVERNAME__|$(XSERVERNAME)|g' \ -e 's|__xinitdir__|$(XINITDIR)|g' \ -e 's|__bindir__|$(bindir)|g' \ -e 's|__libdir__|$(libdir)|g' \ - -e 's|__SCOMAN__|$(SCOMAN)|g' + -e 's|__SCOMAN__|$(SCOMAN)|g' \ + -e 's|__configdir__|$(XINITDIR)|g' + # String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure .man.$(APP_MAN_SUFFIX): diff --git a/app/xinit/man/Makefile.in b/app/xinit/man/Makefile.in index 568da4b3d..33038e51c 100644 --- a/app/xinit/man/Makefile.in +++ b/app/xinit/man/Makefile.in @@ -160,12 +160,14 @@ 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' + -e 's|__libdir__|$(libdir)|g' -e 's|__SCOMAN__|$(SCOMAN)|g' -e \ + 's|__configdir__|$(XINITDIR)|g' MCOOKIE = @MCOOKIE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ +OPENSSL = @OPENSSL@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -175,6 +177,8 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ SCOMAN = @SCOMAN@ diff --git a/app/xinit/man/xinit.man b/app/xinit/man/xinit.man index 31b93aab5..f8005ce40 100644 --- a/app/xinit/man/xinit.man +++ b/app/xinit/man/xinit.man @@ -109,7 +109,7 @@ used. This will start up a server named \fIX\fP and run the user's \fI\.xinitrc\fP, if it exists, or else start an \fIxterm\fP. .TP 8 -.B "xinit \-\^\- /usr/local/bin/Xvnc :1" +.B "xinit \-\^\- __bindir__/Xvnc :1" This is how one could start a specific type of server on an alternate display. .TP 8 .B "xinit \-geometry =80x65+10+10 \-fn 8x13 \-j \-fg white \-bg navy" @@ -149,7 +149,7 @@ a default \fI\.xinitrc\fP that references a site-wide startup file: .in +8 .nf \&#!/bin/sh -\&. /usr/local/lib/site.xinitrc +\&. __configdir__/site.xinitrc .fi .in -8 .sp @@ -161,7 +161,7 @@ novice users: .in +8 .nf \&#!/bin/sh -xinit /usr/local/lib/site.xinitrc \-\^\- __bindir__/X -br +xinit __configdir__/site.xinitrc \-\^\- __bindir__/X -br .fi .in -8 .sp diff --git a/app/xinit/startx.cpp b/app/xinit/startx.cpp index c92c51cd9..c595b8487 100644 --- a/app/xinit/startx.cpp +++ b/app/xinit/startx.cpp @@ -126,7 +126,9 @@ if [ x`defaults read $X11_PREFS_DOMAIN nolisten_tcp` = x1 ] ; then defaultserverargs="$defaultserverargs -nolisten tcp" fi -if defaults read $X11_PREFS_DOMAIN dpi > /dev/null 2>&1 ; then +XCOMM The second check is the real one. The first is to hopefully avoid +XCOMM needless syslog spamming. +if defaults read $X11_PREFS_DOMAIN 2> /dev/null | grep -q 'dpi' && defaults read $X11_PREFS_DOMAIN dpi > /dev/null 2>&1 ; then defaultserverargs="$defaultserverargs -dpi `defaults read $X11_PREFS_DOMAIN dpi`" fi diff --git a/app/xinit/xinit.c b/app/xinit/xinit.c index 2ab817f9a..18e3e109b 100644 --- a/app/xinit/xinit.c +++ b/app/xinit/xinit.c @@ -101,23 +101,23 @@ static char *displayNum = NULL; static char *program = NULL; static Display *xd = NULL; /* server connection */ int status; -int serverpid = -1; -int clientpid = -1; +pid_t serverpid = -1; +pid_t clientpid = -1; volatile int gotSignal = 0; static void Execute(char **vec); static Bool waitforserver(void); -static Bool processTimeout(int timeout, char *string); -static int startServer(char *server[]); -static int startClient(char *client[]); +static Bool processTimeout(int timeout, const char *string); +static pid_t startServer(char *server[]); +static pid_t startClient(char *client[]); static int ignorexio(Display *dpy); static void shutdown(void); static void set_environment(void); -static void Fatal(const char *fmt, ...); -static void Error(const char *fmt, ...); -static void Fatalx(const char *fmt, ...); -static void Errorx(const char *fmt, ...); +static void Fatal(const char *fmt, ...) _X_ATTRIBUTE_PRINTF(1,2) _X_NORETURN; +static void Error(const char *fmt, ...) _X_ATTRIBUTE_PRINTF(1,2); +static void Fatalx(const char *fmt, ...) _X_ATTRIBUTE_PRINTF(1,2) _X_NORETURN; +static void Errorx(const char *fmt, ...) _X_ATTRIBUTE_PRINTF(1,2); static void sigCatch(int sig) @@ -149,7 +149,7 @@ main(int argc, char *argv[]) register char **sptr = server; register char **cptr = client; register char **ptr; - int pid; + pid_t pid; int client_given = 0, server_given = 0; int client_args_given = 0, server_args_given = 0; int start_of_client_args, start_of_server_args; @@ -364,10 +364,11 @@ waitforserver(void) * return TRUE if we timeout waiting for pid to exit, FALSE otherwise. */ static Bool -processTimeout(int timeout, char *string) +processTimeout(int timeout, const char *string) { - int i = 0, pidfound = -1; - static char *laststring; + int i = 0; + pid_t pidfound = -1; + static const char *laststring; for (;;) { if ((pidfound = waitpid(serverpid, &status, WNOHANG)) == serverpid) @@ -388,7 +389,7 @@ processTimeout(int timeout, char *string) return (serverpid != pidfound); } -static int +static pid_t startServer(char *server[]) { sigset_t mask, old; @@ -554,7 +555,7 @@ setWindowPath(void) free(newwindowpath); } -static int +static pid_t startClient(char *client[]) { clientpid = fork(); @@ -627,6 +628,26 @@ shutdown(void) if (processTimeout(3, "server to die")) Fatalx("X server refuses to die"); +#ifdef __sun + else { + /* Restore keyboard mode. */ + serverpid = fork(); + switch (serverpid) { + case 0: + execlp ("kbd_mode", "kbd_mode", "-a", NULL); + Fatal("Unable to run program \"%s\"", "kbd_mode"); + break; + + case 1: + Error("fork failed"); + break; + + default: + fprintf (stderr, "\r\nRestoring keyboard mode\r\n"); + processTimeout(1, "kbd_mode"); + } + } +#endif } static void @@ -636,7 +657,7 @@ set_environment(void) Fatal("unable to set DISPLAY"); } -static void +static void _X_ATTRIBUTE_PRINTF(1,0) verror(const char *fmt, va_list ap) { fprintf(stderr, "%s: ", program); @@ -644,7 +665,7 @@ verror(const char *fmt, va_list ap) fprintf(stderr, ": %s\n", strerror(errno)); } -static void +static void _X_ATTRIBUTE_PRINTF(1,0) verrorx(const char *fmt, va_list ap) { fprintf(stderr, "%s: ", program); |