summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Hooker <sarvatt@ubuntu.com>2012-03-08 16:12:56 -0500
committerRobert Hooker <sarvatt@ubuntu.com>2012-03-08 16:12:56 -0500
commitb1733cf8649f2e2ef4bc07cb8e5c33bdc329e2cd (patch)
tree2841606c058c5a0170fcfa4e4bf78ad229897a5e
parent9105f4dd8de384ac8f58011993f0214b242d7773 (diff)
downloadxutils-dev-b1733cf8649f2e2ef4bc07cb8e5c33bdc329e2cd.tar.gz
imake 1.0.5
-rw-r--r--debian/changelog1
-rw-r--r--debian/versions2
-rw-r--r--imake/ChangeLog87
-rw-r--r--imake/Makefile.am6
-rw-r--r--imake/Makefile.in8
-rw-r--r--imake/aclocal.m41025
-rw-r--r--imake/cleanlinks4
-rw-r--r--imake/cleanlinks.man4
-rwxr-xr-ximake/configure5724
-rw-r--r--imake/configure.ac6
-rw-r--r--imake/imake.c201
-rw-r--r--imake/imake.man30
-rw-r--r--imake/imakemdep.h2
-rw-r--r--imake/makeg.man8
-rw-r--r--imake/mdepend.cpp6
-rw-r--r--imake/mergelib.cpp16
-rw-r--r--imake/mkdirhier.man22
-rw-r--r--imake/mkhtmlindex.man4
-rw-r--r--imake/xmkmf.cpp6
-rw-r--r--imake/xmkmf.man45
20 files changed, 6777 insertions, 430 deletions
diff --git a/debian/changelog b/debian/changelog
index 2db8073..2ee93e1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ xutils-dev (1:7.6+7) UNRELEASED; urgency=low
* util-macros 1.16.0 (superseded)
* util-macros 1.16.2
+ * imake 1.0.5
-- Robert Hooker <sarvatt@ubuntu.com> Mon, 05 Mar 2012 10:52:03 -0500
diff --git a/debian/versions b/debian/versions
index 23f0213..f2ebde3 100644
--- a/debian/versions
+++ b/debian/versions
@@ -25,9 +25,9 @@ gccmakedep | Debian
imake | Debian
------------------------
+1.0.5 | 1:7.6+7
1.0.4 | 1:7.5+5
-
lndir | Debian
------------------------
1.0.2 | 1:7.5+5
diff --git a/imake/ChangeLog b/imake/ChangeLog
index eac8c18..fe13139 100644
--- a/imake/ChangeLog
+++ b/imake/ChangeLog
@@ -1,3 +1,90 @@
+commit 061960e38cb0d6873bda2550f6a8952668193888
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Wed Mar 7 21:47:27 2012 -0800
+
+ imake 1.0.5
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 575c3788c8b770a2c32c9d8461bc7422e3b89676
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Feb 10 18:05:36 2012 -0800
+
+ xmkmf.man: Remove instructions for "X Consortium" monolithic build tree
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit d33b96db427a2305bd230360c9653a91dbff79e0
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Oct 7 18:55:13 2011 -0700
+
+ Fix a bunch of "too many arguments for format" warnings
+
+ Now that the log functions take variable arguments, don't need to pass
+ empty strings when there is no argument for the format string.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 4e3e7fec072591389b4f7b89475ea81e6a4e0ee5
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Oct 7 18:50:48 2011 -0700
+
+ Convert error logging functions to normal idioms
+
+ Allows use of printf attributes for checking format strings/arguments,
+ gets rid of LogFatalI wrapper just used for casting int to char *.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 5aed95badf1bab68b848234fdd25da1ea7025264
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Oct 7 18:36:53 2011 -0700
+
+ Rework temp filename pointers into const & non-const parts
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit bfdbd65cf45eae6ba3565348cec1eeb09927cf5e
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Oct 7 18:31:52 2011 -0700
+
+ Add const attributes to fix gcc -Wwrite-strings warnings
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 7f299010c9327ab1a65a6b781c58b4c3098d13b7
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Oct 7 18:11:43 2011 -0700
+
+ Strip trailing whitespace
+
+ Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}'
+ git diff -w & git diff -b show no diffs from this change
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 99bb38c528f87a2692253ede9f54c4320c6f0986
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Jan 7 20:21:30 2011 -0800
+
+ Remove unused variable in get_sun_compiler_versions
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit d2e1f5ca4614afbc1ca30581fcb1f6e50423fc06
+Author: Adam Jackson <ajax@nwnk.net>
+Date: Mon Nov 1 14:29:33 2010 +1000
+
+ Silence useless pedantry warning from find(1) when running cleanlinks.
+
+ "find: warning: you have specified the -depth option after a non-option
+ argument -type, but options are not positional (-depth affects tests
+ specified before it as well as those specified after it). Please specify
+ options before other arguments."
+
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+ Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
+
commit bf237073d39629599cb77bf0144f862c175bb640
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Oct 30 19:10:35 2010 -0700
diff --git a/imake/Makefile.am b/imake/Makefile.am
index 6a932f3..e5eb246 100644
--- a/imake/Makefile.am
+++ b/imake/Makefile.am
@@ -1,6 +1,6 @@
-#
+#
# Copyright 2005 Red Hat, Inc.
-#
+#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
@@ -10,7 +10,7 @@
# specific, written prior permission. Red Hat makes no
# representations about the suitability of this software for any purpose. It
# is provided "as is" without express or implied warranty.
-#
+#
# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
diff --git a/imake/Makefile.in b/imake/Makefile.in
index ca2ec3c..45caaec 100644
--- a/imake/Makefile.in
+++ b/imake/Makefile.in
@@ -15,9 +15,9 @@
@SET_MAKE@
-#
+#
# Copyright 2005 Red Hat, Inc.
-#
+#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
@@ -27,7 +27,7 @@
# specific, written prior permission. Red Hat makes no
# representations about the suitability of this software for any purpose. It
# is provided "as is" without express or implied warranty.
-#
+#
# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
@@ -158,6 +158,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BASE_CFLAGS = @BASE_CFLAGS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -217,6 +218,7 @@ RAWCPPFLAGS = @RAWCPPFLAGS@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
+STRICT_CFLAGS = @STRICT_CFLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
XCONFDIR = @XCONFDIR@
diff --git a/imake/aclocal.m4 b/imake/aclocal.m4
index face861..16df9c0 100644
--- a/imake/aclocal.m4
+++ b/imake/aclocal.m4
@@ -1028,6 +1028,162 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+#
+# Copyright © 2004 Scott James Remnant <scott@netsplit.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 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+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
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# 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
+# --------------------------------------------------------------
+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_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[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`],
+ [pkg_failed=yes])
+ else
+ pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+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
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$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
+[Package requirements ($2) were not met:
+
+$$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])
+elif test $pkg_failed = untried; then
+ ifelse([$4], , [AC_MSG_FAILURE(dnl
+[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://pkg-config.freedesktop.org/>.])],
+ [$4])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
+
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.
@@ -1067,7 +1223,7 @@ dnl DEALINGS IN THE SOFTWARE.
# See the "minimum version" comment for each macro you use to see what
# version you require.
m4_defun([XORG_MACROS_VERSION],[
-m4_define([vers_have], [1.11.0])
+m4_define([vers_have], [1.16.2])
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,,
@@ -1094,7 +1250,7 @@ AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
# which is not the best choice for supporting other OS'es, but covers most
# of the ones we need for now.
AC_MSG_CHECKING([if $RAWCPP requires -undef])
-AC_LANG_CONFTEST([Does cpp redefine unix ?])
+AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
AC_MSG_RESULT([no])
else
@@ -1112,7 +1268,7 @@ fi
rm -f conftest.$ac_ext
AC_MSG_CHECKING([if $RAWCPP requires -traditional])
-AC_LANG_CONFTEST([Does cpp preserve "whitespace"?])
+AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])])
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
AC_MSG_RESULT([no])
else
@@ -1462,6 +1618,123 @@ AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
]) # XORG_WITH_XMLTO
+# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
+# --------------------------------------------
+# Minimum version: 1.12.0
+# Minimum version for optional DEFAULT argument: 1.12.0
+#
+# XSLT (Extensible Stylesheet Language Transformations) is a declarative,
+# XML-based language used for the transformation of XML documents.
+# The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
+# It is used under the cover by xmlto to generate html files from DocBook/XML.
+# The XSLT processor is often used as a standalone tool for transformations.
+# It should not be assumed that this tool is used only to work with documnetation.
+# When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
+#
+# Interface to module:
+# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
+# XSLTPROC: returns the path of the xsltproc program found
+# returns the path set by the user in the environment
+# --with-xsltproc: 'yes' user instructs the module to use xsltproc
+# 'no' user instructs the module not to use xsltproc
+# have_xsltproc: returns yes if xsltproc found in PATH or no
+#
+# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_XSLTPROC],[
+AC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
+# Preserves the interface, should it be implemented later
+m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(xsltproc,
+ AS_HELP_STRING([--with-xsltproc],
+ [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
+ [use_xsltproc=$withval], [use_xsltproc=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_xsltproc" = x"auto"; then
+ AC_PATH_PROG([XSLTPROC], [xsltproc])
+ if test "x$XSLTPROC" = "x"; then
+ AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
+ have_xsltproc=no
+ else
+ have_xsltproc=yes
+ fi
+elif test "x$use_xsltproc" = x"yes" ; then
+ AC_PATH_PROG([XSLTPROC], [xsltproc])
+ if test "x$XSLTPROC" = "x"; then
+ AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
+ fi
+ have_xsltproc=yes
+elif test "x$use_xsltproc" = x"no" ; then
+ if test "x$XSLTPROC" != "x"; then
+ AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
+ fi
+ have_xsltproc=no
+else
+ AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
+fi
+
+AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
+]) # XORG_WITH_XSLTPROC
+
+# XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
+# ----------------------------------------
+# Minimum version: 1.15.0
+#
+# PERL (Practical Extraction and Report Language) is a language optimized for
+# scanning arbitrary text files, extracting information from those text files,
+# and printing reports based on that information.
+#
+# When DEFAULT is not specified, --with-perl assumes 'auto'.
+#
+# Interface to module:
+# HAVE_PERL: used in makefiles to conditionally scan text files
+# PERL: returns the path of the perl program found
+# returns the path set by the user in the environment
+# --with-perl: 'yes' user instructs the module to use perl
+# 'no' user instructs the module not to use perl
+# have_perl: returns yes if perl found in PATH or no
+#
+# If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_PERL],[
+AC_ARG_VAR([PERL], [Path to perl command])
+# Preserves the interface, should it be implemented later
+m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(perl,
+ AS_HELP_STRING([--with-perl],
+ [Use perl for extracting information from files (default: ]_defopt[)]),
+ [use_perl=$withval], [use_perl=]_defopt)
+m4_undefine([_defopt])
+
+if test "x$use_perl" = x"auto"; then
+ AC_PATH_PROG([PERL], [perl])
+ if test "x$PERL" = "x"; then
+ AC_MSG_WARN([perl not found - cannot extract information and report])
+ have_perl=no
+ else
+ have_perl=yes
+ fi
+elif test "x$use_perl" = x"yes" ; then
+ AC_PATH_PROG([PERL], [perl])
+ if test "x$PERL" = "x"; then
+ AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
+ fi
+ have_perl=yes
+elif test "x$use_perl" = x"no" ; then
+ if test "x$PERL" != "x"; then
+ AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
+ fi
+ have_perl=no
+else
+ AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
+fi
+
+AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
+]) # XORG_WITH_PERL
+
# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
# ----------------
# Minimum version: 1.5.0
@@ -1707,10 +1980,11 @@ AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
]) # XORG_WITH_GROFF
-# XORG_WITH_FOP([DEFAULT])
-# ----------------
+# XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
+# ---------------------------------------
# Minimum version: 1.6.0
# Minimum version for optional DEFAULT argument: 1.11.0
+# Minimum version for optional MIN-VERSION argument: 1.15.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
@@ -1730,7 +2004,7 @@ AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
#
AC_DEFUN([XORG_WITH_FOP],[
AC_ARG_VAR([FOP], [Path to fop command])
-m4_define([_defopt], m4_default([$1], [auto]))
+m4_define([_defopt], m4_default([$2], [auto]))
AC_ARG_WITH(fop,
AS_HELP_STRING([--with-fop],
[Use fop to regenerate documentation (default: ]_defopt[)]),
@@ -1759,6 +2033,22 @@ elif test "x$use_fop" = x"no" ; then
else
AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
fi
+
+# Test for a minimum version of fop, if provided.
+m4_ifval([$1],
+[if test "$have_fop" = yes; then
+ # scrape the fop version
+ AC_MSG_CHECKING([for fop minimum version])
+ fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
+ AC_MSG_RESULT([$fop_version])
+ AS_VERSION_COMPARE([$fop_version], [$1],
+ [if test "x$use_fop" = xauto; then
+ AC_MSG_WARN([fop version $fop_version found, but $1 needed])
+ have_fop=no
+ else
+ AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
+ fi])
+fi])
AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
]) # XORG_WITH_FOP
@@ -1841,12 +2131,12 @@ AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
# parm1: specify the default value, yes or no.
#
AC_DEFUN([XORG_ENABLE_DOCS],[
-m4_define([default], m4_default([$1], [yes]))
+m4_define([docs_default], m4_default([$1], [yes]))
AC_ARG_ENABLE(docs,
AS_HELP_STRING([--enable-docs],
- [Enable building the documentation (default: ]default[)]),
- [build_docs=$enableval], [build_docs=]default)
-m4_undefine([default])
+ [Enable building the documentation (default: ]docs_default[)]),
+ [build_docs=$enableval], [build_docs=]docs_default)
+m4_undefine([docs_default])
AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
AC_MSG_CHECKING([whether to build documentation])
AC_MSG_RESULT([$build_docs])
@@ -1918,6 +2208,251 @@ AC_MSG_CHECKING([whether to build functional specifications])
AC_MSG_RESULT([$build_specs])
]) # XORG_ENABLE_SPECS
+# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
+# ----------------------------------------------
+# Minimum version: 1.13.0
+#
+# This macro enables a builder to enable/disable unit testing
+# It makes no assumption about the test cases implementation
+# Test cases may or may not use Automake "Support for test suites"
+# They may or may not use the software utility library GLib
+#
+# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
+# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
+# The variable enable_unit_tests is used by other macros in this file.
+#
+# Interface to module:
+# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests
+# enable_unit_tests: used in configure.ac for additional configuration
+# --enable-unit-tests: 'yes' user instructs the module to build tests
+# 'no' user instructs the module not to build tests
+# parm1: specify the default value, yes or no.
+#
+AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
+AC_BEFORE([$0], [XORG_WITH_GLIB])
+AC_BEFORE([$0], [XORG_LD_WRAP])
+AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
+m4_define([_defopt], m4_default([$1], [auto]))
+AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
+ [Enable building unit test cases (default: ]_defopt[)]),
+ [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
+m4_undefine([_defopt])
+AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
+AC_MSG_CHECKING([whether to build unit test cases])
+AC_MSG_RESULT([$enable_unit_tests])
+]) # XORG_ENABLE_UNIT_TESTS
+
+# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
+# ----------------------------------------
+# Minimum version: 1.13.0
+#
+# GLib is a library which provides advanced data structures and functions.
+# This macro enables a module to test for the presence of Glib.
+#
+# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
+# Otherwise the value of $enable_unit_tests is blank.
+#
+# Interface to module:
+# HAVE_GLIB: used in makefiles to conditionally build targets
+# with_glib: used in configure.ac to know if GLib has been found
+# --with-glib: 'yes' user instructs the module to use glib
+# 'no' user instructs the module not to use glib
+#
+AC_DEFUN([XORG_WITH_GLIB],[
+AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+m4_define([_defopt], m4_default([$2], [auto]))
+AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
+ [Use GLib library for unit testing (default: ]_defopt[)]),
+ [with_glib=$withval], [with_glib=]_defopt)
+m4_undefine([_defopt])
+
+have_glib=no
+# Do not probe GLib if user explicitly disabled unit testing
+if test "x$enable_unit_tests" != x"no"; then
+ # Do not probe GLib if user explicitly disabled it
+ if test "x$with_glib" != x"no"; then
+ m4_ifval(
+ [$1],
+ [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
+ [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
+ )
+ fi
+fi
+
+# Not having GLib when unit testing has been explicitly requested is an error
+if test "x$enable_unit_tests" = x"yes"; then
+ if test "x$have_glib" = x"no"; then
+ AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
+ fi
+fi
+
+# Having unit testing disabled when GLib has been explicitly requested is an error
+if test "x$enable_unit_tests" = x"no"; then
+ if test "x$with_glib" = x"yes"; then
+ AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
+ fi
+fi
+
+# Not having GLib when it has been explicitly requested is an error
+if test "x$with_glib" = x"yes"; then
+ if test "x$have_glib" = x"no"; then
+ AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
+ fi
+fi
+
+AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
+]) # XORG_WITH_GLIB
+
+# XORG_LD_WRAP([required|optional])
+# ---------------------------------
+# Minimum version: 1.13.0
+#
+# Check if linker supports -wrap, passed via compiler flags
+#
+# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
+# Otherwise the value of $enable_unit_tests is blank.
+#
+# Argument added in 1.16.0 - default is "required", to match existing behavior
+# of returning an error if enable_unit_tests is yes, and ld -wrap is not
+# available, an argument of "optional" allows use when some unit tests require
+# ld -wrap and others do not.
+#
+AC_DEFUN([XORG_LD_WRAP],[
+XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
+ [AC_LANG_PROGRAM([#include <stdlib.h>
+ void __wrap_exit(int status) { return; }],
+ [exit(0);])])
+# Not having ld wrap when unit testing has been explicitly requested is an error
+if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
+ if test "x$have_ld_wrap" = x"no"; then
+ AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
+ fi
+fi
+AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
+#
+]) # XORG_LD_WRAP
+
+# XORG_CHECK_LINKER_FLAGS
+# -----------------------
+# SYNOPSIS
+#
+# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
+#
+# DESCRIPTION
+#
+# Check whether the given linker FLAGS work with the current language's
+# linker, or whether they give an error.
+#
+# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+# success/failure.
+#
+# PROGRAM-SOURCE is the program source to link with, if needed
+#
+# NOTE: Based on AX_CHECK_COMPILER_FLAGS.
+#
+# LICENSE
+#
+# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
+# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
+# Copyright (c) 2009 Matteo Frigo
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.#
+AC_DEFUN([XORG_CHECK_LINKER_FLAGS],
+[AC_MSG_CHECKING([whether the linker accepts $1])
+dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
+AS_LITERAL_IF([$1],
+ [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
+ ax_save_FLAGS=$LDFLAGS
+ LDFLAGS="$1"
+ AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])],
+ AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
+ AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
+ LDFLAGS=$ax_save_FLAGS])],
+ [ax_save_FLAGS=$LDFLAGS
+ LDFLAGS="$1"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM()],
+ eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
+ eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
+ LDFLAGS=$ax_save_FLAGS])
+eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
+AC_MSG_RESULT($xorg_check_linker_flags)
+if test "x$xorg_check_linker_flags" = xyes; then
+ m4_default([$2], :)
+else
+ m4_default([$3], :)
+fi
+]) # XORG_CHECK_LINKER_FLAGS
+
+# XORG_MEMORY_CHECK_FLAGS
+# -----------------------
+# Minimum version: 1.16.0
+#
+# This macro attempts to find appropriate memory checking functionality
+# for various platforms which unit testing code may use to catch various
+# forms of memory allocation and access errors in testing.
+#
+# Interface to module:
+# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
+# Usually added to TESTS_ENVIRONMENT in Makefile.am
+#
+# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim.
+#
+AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[
+
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV],
+ [Environment variables to enable memory checking in tests])
+
+# Check for different types of support on different platforms
+case $host_os in
+ solaris*)
+ AC_CHECK_LIB([umem], [umem_alloc],
+ [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'])
+ ;;
+ *-gnu*) # GNU libc - Value is used as a single byte bit pattern,
+ # both directly and inverted, so should not be 0 or 255.
+ malloc_debug_env='MALLOC_PERTURB_=15'
+ ;;
+ darwin*)
+ malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
+ ;;
+ *bsd*)
+ malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
+ ;;
+esac
+
+# User supplied flags override default flags
+if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
+ malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
+fi
+
+AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
+]) # XORG_WITH_LINT
+
# XORG_CHECK_MALLOC_ZERO
# ----------------------
# Minimum version: 1.0.0
@@ -1934,18 +2469,16 @@ AC_ARG_ENABLE(malloc0returnsnull,
AC_MSG_CHECKING([whether malloc(0) returns NULL])
if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
- AC_RUN_IFELSE([
-char *malloc();
-char *realloc();
-char *calloc();
-main() {
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([
+#include <stdlib.h>
+],[
char *m0, *r0, *c0, *p;
m0 = malloc(0);
p = malloc(10);
r0 = realloc(p,0);
- c0 = calloc(0);
- exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
-}],
+ c0 = calloc(0,10);
+ exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
+])],
[MALLOC_ZERO_RETURNS_NULL=yes],
[MALLOC_ZERO_RETURNS_NULL=no],
[MALLOC_ZERO_RETURNS_NULL=yes])
@@ -2071,59 +2604,296 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
]) # XORG_LINT_LIBRARY
+# XORG_COMPILER_BRAND
+# -------------------
+# Minimum version: 1.14.0
+#
+# Checks for various brands of compilers and sets flags as appropriate:
+# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
+# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
+# clang compiler - sets CLANGCC to "yes"
+# Intel compiler - sets INTELCC to "yes"
+# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
+#
+AC_DEFUN([XORG_COMPILER_BRAND], [
+AC_LANG_CASE(
+ [C], [
+ AC_REQUIRE([AC_PROG_CC_C99])
+ ],
+ [C++], [
+ AC_REQUIRE([AC_PROG_CXX])
+ ]
+)
+AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
+AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
+AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+]) # XORG_COMPILER_BRAND
+
+# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
+# ---------------
+# Minimum version: 1.16.0
+#
+# Test if the compiler works when passed the given flag as a command line argument.
+# If it succeeds, the flag is appeneded to the given variable. If not, it tries the
+# next flag in the list until there are no more options.
+#
+# Note that this does not guarantee that the compiler supports the flag as some
+# compilers will simply ignore arguments that they do not understand, but we do
+# attempt to weed out false positives by using -Werror=unknown-warning-option and
+# -Werror=unused-command-line-argument
+#
+AC_DEFUN([XORG_TESTSET_CFLAG], [
+m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
+m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
+
+AC_LANG_COMPILER_REQUIRE
+
+AC_LANG_CASE(
+ [C], [
+ AC_REQUIRE([AC_PROG_CC_C99])
+ define([PREFIX], [C])
+ ],
+ [C++], [
+ define([PREFIX], [CXX])
+ ]
+)
+
+[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
+ AC_CACHE_CHECK([if compiler supports -Werror=unknown-warning-option],
+ xorg_cv_compiler_flag_unknown_warning_option,
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
+ [xorg_cv_compiler_flag_unknown_warning_option=yes],
+ [xorg_cv_compiler_flag_unknown_warning_option=no]))
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
+ fi
+ PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
+ AC_CACHE_CHECK([if compiler supports -Werror=unused-command-line-argument],
+ xorg_cv_compiler_flag_unused_command_line_argument,
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
+ [xorg_cv_compiler_flag_unused_command_line_argument=yes],
+ [xorg_cv_compiler_flag_unused_command_line_argument=no]))
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
+fi
+
+found="no"
+m4_foreach([flag], m4_cdr($@), [
+ if test $found = "no" ; then
+ if test "x$xorg_testset_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
+ 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 $CC supports ]flag[])
+ cacheid=`AS_ECHO([xorg_cv_cc_flag_]flag[])`
+ AC_CACHE_VAL(AS_TR_SH($cacheid),
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
+ [eval AS_TR_SH($cacheid)=yes],
+ [eval AS_TR_SH($cacheid)=no])])
+
+ PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
+
+ eval supported=$AS_TR_SH($cacheid)
+ AC_MSG_RESULT([$supported])
+ if test "$supported" = "yes" ; then
+ $1="$$1 ]flag["
+ found="yes"
+ fi
+ fi
+])
+]) # XORG_TESTSET_CFLAG
+
+# XORG_COMPILER_FLAGS
+# ---------------
+# Minimum version: 1.16.0
+#
+# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
+# arguments supported by the selected compiler which do NOT alter the generated
+# code. These arguments will cause the compiler to print various warnings
+# during compilation AND turn a conservative set of warnings into errors.
+#
+# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
+# future versions of util-macros as options are added to new compilers.
+#
+AC_DEFUN([XORG_COMPILER_FLAGS], [
+AC_REQUIRE([XORG_COMPILER_BRAND])
+
+AC_ARG_ENABLE(selective-werror,
+ AS_HELP_STRING([--disable-selective-werror],
+ [Turn off selective compiler errors. (default: enabled)]),
+ [SELECTIVE_WERROR=$enableval],
+ [SELECTIVE_WERROR=yes])
+
+AC_LANG_CASE(
+ [C], [
+ define([PREFIX], [C])
+ ],
+ [C++], [
+ define([PREFIX], [CXX])
+ ]
+)
+# -v is too short to test reliably with XORG_TESTSET_CFLAG
+if test "x$SUNCC" = "xyes"; then
+ [BASE_]PREFIX[FLAGS]="-v"
+else
+ [BASE_]PREFIX[FLAGS]=""
+fi
+
+# This chunk of warnings were those that existed in the legacy CWARNFLAGS
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
+
+AC_LANG_CASE(
+ [C], [
+ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
+ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
+ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
+ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
+ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition])
+ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
+ ]
+)
+
+# This chunk adds additional warnings that could catch undesired effects.
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
+
+# These are currently disabled because they are noisy. They will be enabled
+# in the future once the codebase is sufficiently modernized to silence
+# them. For now, I don't want them to drown out the other warnings.
+# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
+# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
+# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
+
+# Turn some warnings into errors, so we don't accidently get successful builds
+# when there are problems that should be fixed.
+
+if test "x$SELECTIVE_WERROR" = "xyes" ; then
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
+else
+AC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
+XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
+fi
+
+AC_SUBST([BASE_]PREFIX[FLAGS])
+]) # XORG_COMPILER_FLAGS
+
# XORG_CWARNFLAGS
# ---------------
# Minimum version: 1.2.0
+# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
#
# Defines CWARNFLAGS to enable C compiler warnings.
#
+# This function is deprecated because it defines -fno-strict-aliasing
+# which alters the code generated by the compiler. If -fno-strict-aliasing
+# is needed, then it should be added explicitly in the module when
+# it is updated to use BASE_CFLAGS.
+#
AC_DEFUN([XORG_CWARNFLAGS], [
-AC_REQUIRE([AC_PROG_CC_C99])
-if test "x$GCC" = xyes ; then
- CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
--Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
--Wbad-function-cast -Wformat=2"
- case `$CC -dumpversion` in
- 3.4.* | 4.*)
- CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
- ;;
- esac
-else
- AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
- if test "x$SUNCC" = "xyes"; then
- CWARNFLAGS="-v"
- fi
-fi
-AC_SUBST(CWARNFLAGS)
+AC_REQUIRE([XORG_COMPILER_FLAGS])
+AC_REQUIRE([XORG_COMPILER_BRAND])
+AC_LANG_CASE(
+ [C], [
+ CWARNFLAGS="$BASE_CFLAGS"
+ if test "x$GCC" = xyes ; then
+ CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
+ fi
+ AC_SUBST(CWARNFLAGS)
+ ]
+)
]) # XORG_CWARNFLAGS
# XORG_STRICT_OPTION
# -----------------------
# Minimum version: 1.3.0
#
-# Add configure option to enable strict compilation
+# Add configure option to enable strict compilation flags, such as treating
+# warnings as fatal errors.
+# If --enable-strict-compilation is passed to configure, adds strict flags to
+# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
+#
+# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
+# when strict compilation is unconditionally desired.
AC_DEFUN([XORG_STRICT_OPTION], [
-# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
-AC_REQUIRE([AC_PROG_CC_C99])
AC_REQUIRE([XORG_CWARNFLAGS])
+AC_REQUIRE([XORG_COMPILER_FLAGS])
AC_ARG_ENABLE(strict-compilation,
AS_HELP_STRING([--enable-strict-compilation],
[Enable all warnings from compiler and make them errors (default: disabled)]),
[STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
+
+AC_LANG_CASE(
+ [C], [
+ define([PREFIX], [C])
+ ],
+ [C++], [
+ define([PREFIX], [CXX])
+ ]
+)
+
+[STRICT_]PREFIX[FLAGS]=""
+XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
+XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
+
+# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
+# activate it with -Werror, so we add it here explicitly.
+XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
+
if test "x$STRICT_COMPILE" = "xyes"; then
- AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
- AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
- if test "x$GCC" = xyes ; then
- STRICT_CFLAGS="-pedantic -Werror"
- elif test "x$SUNCC" = "xyes"; then
- STRICT_CFLAGS="-errwarn"
- elif test "x$INTELCC" = "xyes"; then
- STRICT_CFLAGS="-Werror"
- fi
+ [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
+ AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
fi
-CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
-AC_SUBST([CWARNFLAGS])
+AC_SUBST([STRICT_]PREFIX[FLAGS])
+AC_SUBST([BASE_]PREFIX[FLAGS])
+AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
]) # XORG_STRICT_OPTION
# XORG_DEFAULT_OPTIONS
@@ -2134,6 +2904,7 @@ AC_SUBST([CWARNFLAGS])
#
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
AC_REQUIRE([AC_PROG_INSTALL])
+XORG_COMPILER_FLAGS
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_RELEASE_VERSION
@@ -2225,159 +2996,3 @@ echo 'git directory not found: installing possibly empty changelog.' >&2)"
AC_SUBST([CHANGELOG_CMD])
]) # XORG_CHANGELOG
-# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
-#
-# Copyright © 2004 Scott James Remnant <scott@netsplit.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 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-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
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
- AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
- _pkg_min_version=m4_default([$1], [0.9.0])
- AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
- if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- PKG_CONFIG=""
- fi
-
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
-
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# 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
-# --------------------------------------------------------------
-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_ifvaln([$3], [else
- $3])dnl
-fi])
-
-
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[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`],
- [pkg_failed=yes])
- else
- pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
-
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
-else
- _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
-
-
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
-
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
-
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
-
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
-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
- _PKG_SHORT_ERRORS_SUPPORTED
- if test $_pkg_short_errors_supported = yes; then
- $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
- else
- $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$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
-[Package requirements ($2) were not met:
-
-$$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])
-elif test $pkg_failed = untried; then
- ifelse([$4], , [AC_MSG_FAILURE(dnl
-[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://pkg-config.freedesktop.org/>.])],
- [$4])
-else
- $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
- $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
- AC_MSG_RESULT([yes])
- ifelse([$3], , :, [$3])
-fi[]dnl
-])# PKG_CHECK_MODULES
-
diff --git a/imake/cleanlinks b/imake/cleanlinks
index 3c81d9f..3024d8a 100644
--- a/imake/cleanlinks
+++ b/imake/cleanlinks
@@ -1,7 +1,7 @@
#!/bin/sh
#
# Copyright © 2000, 2003 by The XFree86 Project, Inc
-#
+#
# Remove dangling symlinks and empty directories from a shadow link tree
# (created with lndir).
#
@@ -22,5 +22,5 @@ find . -type l -print |
echo Removing empty directories ...
#find . -type d -depth -print | xargs rmdir > /dev/null 2>&1
-find . -type d -depth -empty -print -exec rmdir {} \;
+find . -depth -type d -empty -print -exec rmdir {} \;
exit 0
diff --git a/imake/cleanlinks.man b/imake/cleanlinks.man
index d550ef5..a498214 100644
--- a/imake/cleanlinks.man
+++ b/imake/cleanlinks.man
@@ -21,9 +21,9 @@ directory.
.BR lndir (1).
.SH AUTHOR
.PP
-The version of the
+The version of the
.I cleanlinks
-included in this X.Org Foundation release was originally written
+included in this X.Org Foundation release was originally written
by David Dawes wrote as a part of XFree86.
.PP
Colin Watson wrote this manual page, originally for the Debian Project.
diff --git a/imake/configure b/imake/configure
index d71b6f6..d4c46f0 100755
--- a/imake/configure
+++ b/imake/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for imake 1.0.4.
+# Generated by GNU Autoconf 2.68 for imake 1.0.5.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@@ -561,8 +561,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='imake'
PACKAGE_TARNAME='imake'
-PACKAGE_VERSION='1.0.4'
-PACKAGE_STRING='imake 1.0.4'
+PACKAGE_VERSION='1.0.5'
+PACKAGE_STRING='imake 1.0.5'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
PACKAGE_URL=''
@@ -662,7 +662,9 @@ build
INSTALL_CMD
PKG_CONFIG
CHANGELOG_CMD
+STRICT_CFLAGS
CWARNFLAGS
+BASE_CFLAGS
EGREP
GREP
CPP
@@ -751,6 +753,7 @@ ac_user_opts='
enable_option_checking
enable_maintainer_mode
enable_dependency_tracking
+enable_selective_werror
enable_strict_compilation
enable_silent_rules
with_config_dir
@@ -1320,7 +1323,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 imake 1.0.4 to adapt to many kinds of systems.
+\`configure' configures imake 1.0.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1390,7 +1393,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of imake 1.0.4:";;
+ short | recursive ) echo "Configuration of imake 1.0.5:";;
esac
cat <<\_ACEOF
@@ -1402,6 +1405,9 @@ Optional Features:
(and sometimes confusing) to the casual installer
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
+ --disable-selective-werror
+ Turn off selective compiler errors. (default:
+ enabled)
--enable-strict-compilation
Enable all warnings from compiler and make them
errors (default: disabled)
@@ -1509,7 +1515,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-imake configure 1.0.4
+imake configure 1.0.5
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1833,7 +1839,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 imake $as_me 1.0.4, which was
+It was created by imake $as_me 1.0.5, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2648,7 +2654,7 @@ fi
# Define the identity of the package.
PACKAGE='imake'
- VERSION='1.0.4'
+ VERSION='1.0.5'
cat >>confdefs.h <<_ACEOF
@@ -4283,6 +4289,32 @@ done
+
+
+ac_fn_c_check_decl "$LINENO" "__clang__" "ac_cv_have_decl___clang__" "$ac_includes_default"
+if test "x$ac_cv_have_decl___clang__" = xyes; then :
+ CLANGCC="yes"
+else
+ CLANGCC="no"
+fi
+
+ac_fn_c_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default"
+if test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes; then :
+ INTELCC="yes"
+else
+ INTELCC="no"
+fi
+
+ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
+if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
+ SUNCC="yes"
+else
+ SUNCC="no"
+fi
+
+
+
+
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
@@ -4541,31 +4573,5248 @@ $as_echo "$ac_cv_path_SED" >&6; }
-if test "x$GCC" = xyes ; then
- CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
--Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
--Wbad-function-cast -Wformat=2"
- case `$CC -dumpversion` in
- 3.4.* | 4.*)
- CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
- ;;
- esac
+
+# Check whether --enable-selective-werror was given.
+if test "${enable_selective_werror+set}" = set; then :
+ enableval=$enable_selective_werror; SELECTIVE_WERROR=$enableval
else
- ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
-if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
- SUNCC="yes"
+ SELECTIVE_WERROR=yes
+fi
+
+
+
+
+
+# -v is too short to test reliably with XORG_TESTSET_CFLAG
+if test "x$SUNCC" = "xyes"; then
+ BASE_CFLAGS="-v"
else
- SUNCC="no"
+ BASE_CFLAGS=""
fi
- if test "x$SUNCC" = "xyes"; then
- CWARNFLAGS="-v"
- fi
+# This chunk of warnings were those that existed in the legacy CWARNFLAGS
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wall`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wall"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wpointer-arith`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wpointer-arith"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wmissing-declarations`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wmissing-declarations"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wformat=2`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wformat=2"
+ found="yes"
+ fi
+ fi
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wformat`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wformat"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wstrict-prototypes`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wstrict-prototypes"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wmissing-prototypes`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wmissing-prototypes"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wnested-externs`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wnested-externs"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wbad-function-cast`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wbad-function-cast"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wold-style-definition`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wold-style-definition"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wdeclaration-after-statement`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wdeclaration-after-statement"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+# This chunk adds additional warnings that could catch undesired effects.
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wunused`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wunused"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wuninitialized`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wuninitialized"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wshadow`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wshadow"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wcast-qual`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wcast-qual"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wmissing-noreturn`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wmissing-noreturn"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wmissing-format-attribute`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wmissing-format-attribute"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ fi
+
+ CFLAGS="$CFLAGS -Wredundant-decls"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wredundant-decls" >&5
+$as_echo_n "checking if $CC supports -Wredundant-decls... " >&6; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wredundant-decls`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wredundant-decls"
+ found="yes"
+ fi
+ fi
+
+
+
+# These are currently disabled because they are noisy. They will be enabled
+# in the future once the codebase is sufficiently modernized to silence
+# them. For now, I don't want them to drown out the other warnings.
+# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
+# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
+# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
+
+# Turn some warnings into errors, so we don't accidently get successful builds
+# when there are problems that should be fixed.
+
+if test "x$SELECTIVE_WERROR" = "xyes" ; then
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=implicit`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=implicit"
+ found="yes"
+ fi
+ fi
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=nonnull`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=nonnull"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=init-self`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=init-self"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=main`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=main"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=missing-braces`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=missing-braces"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=sequence-point`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=sequence-point"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=return-type`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=return-type"
+ found="yes"
+ fi
+ fi
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-errwarn=E_FUNC_HAS_NO_RETURN_STMT`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=trigraphs`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=trigraphs"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=array-bounds`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=array-bounds"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=write-strings`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=write-strings"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=address`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=address"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=int-to-pointer-cast`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=int-to-pointer-cast"
+ found="yes"
+ fi
+ fi
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-errwarn=E_BAD_PTR_INT_COMBINATION`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=pointer-to-int-cast`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Werror=pointer-to-int-cast"
+ found="yes"
+ fi
+ fi
+
+ # Also -errwarn=E_BAD_PTR_INT_COMBINATION
+else
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT" >&5
+$as_echo "$as_me: WARNING: You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT" >&2;}
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wimplicit`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wimplicit"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wnonnull`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wnonnull"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Winit-self`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Winit-self"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wmain`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wmain"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wmissing-braces`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wmissing-braces"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wsequence-point`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wsequence-point"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wreturn-type`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wreturn-type"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wtrigraphs`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wtrigraphs"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Warray-bounds`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Warray-bounds"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wwrite-strings`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wwrite-strings"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Waddress`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Waddress"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wint-to-pointer-cast`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wint-to-pointer-cast"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Wpointer-to-int-cast`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ BASE_CFLAGS="$BASE_CFLAGS -Wpointer-to-int-cast"
+ found="yes"
+ fi
+ fi
+
+
+fi
+
+
+
+
+
+
+
+ CWARNFLAGS="$BASE_CFLAGS"
+ if test "x$GCC" = xyes ; then
+ CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
+ fi
+
+
-# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
@@ -4576,30 +9825,419 @@ else
STRICT_COMPILE=no
fi
-if test "x$STRICT_COMPILE" = "xyes"; then
- ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
-if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then :
- SUNCC="yes"
+
+
+
+
+
+STRICT_CFLAGS=""
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- SUNCC="no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
fi
- ac_fn_c_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default"
-if test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes; then :
- INTELCC="yes"
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- INTELCC="no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-pedantic`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ STRICT_CFLAGS="$STRICT_CFLAGS -pedantic"
+ found="yes"
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ STRICT_CFLAGS="$STRICT_CFLAGS -Werror"
+ found="yes"
+ fi
+ fi
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-errwarn`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
- if test "x$GCC" = xyes ; then
- STRICT_CFLAGS="-pedantic -Werror"
- elif test "x$SUNCC" = "xyes"; then
- STRICT_CFLAGS="-errwarn"
- elif test "x$INTELCC" = "xyes"; then
- STRICT_CFLAGS="-Werror"
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ STRICT_CFLAGS="$STRICT_CFLAGS -errwarn"
+ found="yes"
+ fi
fi
+
+
+
+# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
+# activate it with -Werror, so we add it here explicitly.
+
+
+
+
+
+
+
+
+
+
+
+xorg_testset_save_CFLAGS="$CFLAGS"
+
+if test "x$xorg_testset_unknown_warning_option" = "x" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unknown-warning-option" >&5
+$as_echo_n "checking if compiler supports -Werror=unknown-warning-option... " >&6; }
+if ${xorg_cv_compiler_flag_unknown_warning_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unknown_warning_option=yes
+else
+ xorg_cv_compiler_flag_unknown_warning_option=no
fi
-CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unknown_warning_option" >&5
+$as_echo "$xorg_cv_compiler_flag_unknown_warning_option" >&6; }
+ xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+ CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=unused-command-line-argument" >&5
+$as_echo_n "checking if compiler supports -Werror=unused-command-line-argument... " >&6; }
+if ${xorg_cv_compiler_flag_unused_command_line_argument+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xorg_cv_compiler_flag_unused_command_line_argument=yes
+else
+ xorg_cv_compiler_flag_unused_command_line_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_compiler_flag_unused_command_line_argument" >&5
+$as_echo "$xorg_cv_compiler_flag_unused_command_line_argument" >&6; }
+ xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
+ CFLAGS="$xorg_testset_save_CFLAGS"
+fi
+
+found="no"
+
+ if test $found = "no" ; then
+ if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ CFLAGS="$CFLAGS -Werror=unknown-warning-option"
+ fi
+
+ if test "x$xorg_testset_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; }
+ cacheid=`$as_echo xorg_cv_cc_flag_-Werror=attributes`
+ if { as_var=`$as_echo "$cacheid" | $as_tr_sh`; eval \${$as_var+:} false; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval `$as_echo "$cacheid" | $as_tr_sh`=yes
+else
+ eval `$as_echo "$cacheid" | $as_tr_sh`=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$xorg_testset_save_CFLAGS"
+
+ eval supported=$`$as_echo "$cacheid" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
+$as_echo "$supported" >&6; }
+ if test "$supported" = "yes" ; then
+ STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes"
+ found="yes"
+ fi
+ fi
+
+
+
+if test "x$STRICT_COMPILE" = "xyes"; then
+ BASE_CFLAGS="$BASE_CFLAGS $STRICT_CFLAGS"
+ CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+fi
+
+
@@ -5882,7 +11520,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 imake $as_me 1.0.4, which was
+This file was extended by imake $as_me 1.0.5, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5948,7 +11586,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="\\
-imake config.status 1.0.4
+imake config.status 1.0.5
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/imake/configure.ac b/imake/configure.ac
index 2083d29..04bfda9 100644
--- a/imake/configure.ac
+++ b/imake/configure.ac
@@ -1,6 +1,6 @@
dnl Copyright 2005 Red Hat, Inc.
-dnl
+dnl
dnl Permission to use, copy, modify, distribute, and sell this software and its
dnl documentation for any purpose is hereby granted without fee, provided that
dnl the above copyright notice appear in all copies and that both that
@@ -10,7 +10,7 @@ dnl advertising or publicity pertaining to distribution of the software without
dnl specific, written prior permission. Red Hat makes no
dnl representations about the suitability of this software for any purpose. It
dnl is provided "as is" without express or implied warranty.
-dnl
+dnl
dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
@@ -22,7 +22,7 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ([2.60])
-AC_INIT([imake], [1.0.4],
+AC_INIT([imake], [1.0.5],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [imake])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
diff --git a/imake/imake.c b/imake/imake.c
index c628fc3..1cb8388 100644
--- a/imake/imake.c
+++ b/imake/imake.c
@@ -154,6 +154,8 @@ in this Software without prior written authorization from The Open Group.
#endif
#include <stdlib.h>
#include <stdio.h>
+#include <stdarg.h>
+#include <X11/Xfuncproto.h>
#include <X11/Xosdefs.h>
#include <string.h>
#include <ctype.h>
@@ -298,11 +300,13 @@ void KludgeOutputLine(char **), KludgeResetRule(void);
# endif
#endif
-char *cpp = NULL;
+const char *cpp = NULL;
-char *tmpMakefile = "/tmp/Imf.XXXXXX";
-char *tmpImakefile = "/tmp/IIf.XXXXXX";
-char *make_argv[ ARGUMENTS ] = {
+const char *tmpMakefile;
+const char *tmpMakefileTemplate = "/tmp/Imf.XXXXXX";
+const char *tmpImakefile;
+const char *tmpImakefileTemplate = "/tmp/IIf.XXXXXX";
+const char *make_argv[ ARGUMENTS ] = {
#ifdef WIN32
"nmake"
#else
@@ -312,53 +316,53 @@ char *make_argv[ ARGUMENTS ] = {
int make_argindex;
int cpp_argindex;
-char *Imakefile = NULL;
-char *Makefile = "Makefile";
-char *Template = "Imake.tmpl";
-char *ImakefileC = "Imakefile.c";
+const char *Imakefile = NULL;
+const char *Makefile = "Makefile";
+const char *Template = "Imake.tmpl";
+const char *ImakefileC = "Imakefile.c";
boolean haveImakefileC = FALSE;
-char *cleanedImakefile = NULL;
-char *program;
-char *FindImakefile(char *Imakefile);
-char *ReadLine(FILE *tmpfd, char *tmpfname);
-char *CleanCppInput(char *imakefile);
-char *Strdup(char *cp);
+const char *cleanedImakefile = NULL;
+const char *program;
+const char *FindImakefile(const char *Imakefile);
+char *ReadLine(FILE *tmpfd, const char *tmpfname);
+const char *CleanCppInput(const char *imakefile);
+char *Strdup(const char *cp);
char *Emalloc(int size);
-void LogFatalI(char *s, int i), LogFatal(char *x0, char *x1),
- LogMsg(char *x0, char *x1);
+void LogFatal(const char *x0, ...) _X_ATTRIBUTE_PRINTF(1, 2);
+void LogMsg(const char *x0, ...) _X_ATTRIBUTE_PRINTF(1, 2);
void showit(FILE *fd);
void wrapup(void);
void init(void);
-void AddMakeArg(char *arg);
-void AddCppArg(char *arg);
+void AddMakeArg(const char *arg);
+void AddCppArg(const char *arg);
#ifdef CROSSCOMPILE
char *CrossCompileCPP(void);
#endif
void SetOpts(int argc, char **argv);
-void CheckImakefileC(char *masterc);
-void cppit(char *imakefile, char *template, char *masterc,
- FILE *outfd, char *outfname);
+void CheckImakefileC(const char *masterc);
+void cppit(const char *imakefile, const char *template, const char *masterc,
+ FILE *outfd, const char *outfname);
void makeit(void);
-void CleanCppOutput(FILE *tmpfd, char *tmpfname);
+void CleanCppOutput(FILE *tmpfd, const char *tmpfname);
boolean isempty(char *line);
-void writetmpfile(FILE *fd, char *buf, int cnt, char *fname);
+void writetmpfile(FILE *fd, const char *buf, int cnt, const char *fname);
#ifdef SIGNALRETURNSINT
int catch(int sig);
#else
void catch(int sig);
#endif
-void showargs(char **argv);
-boolean optional_include(FILE *inFile, char *defsym, char *fname);
-void doit(FILE *outfd, char *cmd, char **argv);
+void showargs(const char **argv);
+boolean optional_include(FILE *inFile, const char *defsym, const char *fname);
+void doit(FILE *outfd, const char *cmd, const char **argv);
boolean define_os_defaults(FILE *inFile);
#ifdef CROSSCOMPILE
static void get_cross_compile_dir(FILE *inFile);
#endif
#ifdef CROSSCOMPILEDIR
-char *CrossCompileDir = CROSSCOMPILEDIR;
+const char *CrossCompileDir = CROSSCOMPILEDIR;
#else
-char *CrossCompileDir = "";
+const char *CrossCompileDir = "";
#endif
boolean CrossCompiling = FALSE;
@@ -398,21 +402,22 @@ main(int argc, char *argv[])
#ifdef HAVE_MKSTEMP
int fd;
#endif
- tmpMakefile = Strdup(tmpMakefile);
+ char *tmpMakefileName = Strdup(tmpMakefileTemplate);
#ifndef HAVE_MKSTEMP
- if (mktemp(tmpMakefile) == NULL ||
- (tmpfd = fopen(tmpMakefile, "w+")) == NULL) {
- LogFatal("Cannot create temporary file %s.", tmpMakefile);
+ if (mktemp(tmpMakefileName) == NULL ||
+ (tmpfd = fopen(tmpMakefileName, "w+")) == NULL) {
+ LogFatal("Cannot create temporary file %s.", tmpMakefileName);
}
#else
- fd = mkstemp(tmpMakefile);
+ fd = mkstemp(tmpMakefileName);
if (fd == -1 || (tmpfd = fdopen(fd, "w+")) == NULL) {
if (fd != -1) {
- unlink(tmpMakefile); close(fd);
+ unlink(tmpMakefileName); close(fd);
}
- LogFatal("Cannot create temporary file %s.", tmpMakefile);
+ LogFatal("Cannot create temporary file %s.", tmpMakefileName);
}
#endif
+ tmpMakefile = tmpMakefileName;
}
AddMakeArg("-f");
AddMakeArg( tmpMakefile );
@@ -465,7 +470,7 @@ void
catch(int sig)
{
errno = 0;
- LogFatalI("Signal %d.", sig);
+ LogFatal("Signal %d.", sig);
}
/*
@@ -539,21 +544,21 @@ init(void)
}
void
-AddMakeArg(char *arg)
+AddMakeArg(const char *arg)
{
errno = 0;
if (make_argindex >= ARGUMENTS-1)
- LogFatal("Out of internal storage.", "");
+ LogFatal("Out of internal storage.");
make_argv[ make_argindex++ ] = arg;
make_argv[ make_argindex ] = NULL;
}
void
-AddCppArg(char *arg)
+AddCppArg(const char *arg)
{
errno = 0;
if (cpp_argindex >= ARGUMENTS-1)
- LogFatal("Out of internal storage.", "");
+ LogFatal("Out of internal storage.");
cpp_argv[ cpp_argindex++ ] = arg;
cpp_argv[ cpp_argindex ] = NULL;
}
@@ -585,7 +590,7 @@ SetOpts(int argc, char **argv)
else {
argc--, argv++;
if (! argc)
- LogFatal("No description arg after -f flag", "");
+ LogFatal("No description arg after -f flag");
Imakefile = argv[0];
}
} else if (argv[0][1] == 's') {
@@ -595,7 +600,7 @@ SetOpts(int argc, char **argv)
else {
argc--, argv++;
if (!argc)
- LogFatal("No description arg after -s flag", "");
+ LogFatal("No description arg after -s flag");
Makefile = ((argv[0][0] == '-') && !argv[0][1]) ?
NULL : argv[0];
}
@@ -609,7 +614,7 @@ SetOpts(int argc, char **argv)
else {
argc--, argv++;
if (! argc)
- LogFatal("No description arg after -T flag", "");
+ LogFatal("No description arg after -T flag");
Template = argv[0];
}
} else if (argv[0][1] == 'C') {
@@ -618,7 +623,7 @@ SetOpts(int argc, char **argv)
else {
argc--, argv++;
if (! argc)
- LogFatal("No imakeCfile arg after -C flag", "");
+ LogFatal("No imakeCfile arg after -C flag");
ImakefileC = argv[0];
}
} else if (argv[0][1] == 'v') {
@@ -653,8 +658,8 @@ SetOpts(int argc, char **argv)
AddCppArg(ImakefileC);
}
-char *
-FindImakefile(char *Imakefile)
+const char *
+FindImakefile(const char *Imakefile)
{
if (Imakefile) {
if (access(Imakefile, R_OK) < 0)
@@ -662,7 +667,7 @@ FindImakefile(char *Imakefile)
} else {
if (access("Imakefile", R_OK) < 0) {
if (access("imakefile", R_OK) < 0)
- LogFatal("No description file.", "");
+ LogFatal("No description file.");
else
Imakefile = "imakefile";
} else
@@ -671,44 +676,50 @@ FindImakefile(char *Imakefile)
return(Imakefile);
}
-void
-LogFatalI(char *s, int i)
+static void _X_ATTRIBUTE_PRINTF(1, 0)
+vLogMsg(const char *fmt, va_list args)
{
- /*NOSTRICT*/
- LogFatal(s, (char *)(long)i);
+ int error_number = errno;
+
+ if (error_number) {
+ fprintf(stderr, "%s: ", program);
+ fprintf(stderr, "%s\n", strerror(error_number));
+ }
+ fprintf(stderr, "%s: ", program);
+ vfprintf(stderr, fmt, args);
+ fprintf(stderr, "\n");
}
void
-LogFatal(char *x0, char *x1)
+LogFatal(const char *fmt, ...)
{
static boolean entered = FALSE;
+ va_list args;
if (entered)
return;
entered = TRUE;
- LogMsg(x0, x1);
+ va_start(args, fmt);
+ vLogMsg(fmt, args);
+ va_end(args);
fprintf(stderr, " Stop.\n");
wrapup();
exit(1);
}
void
-LogMsg(char *x0, char *x1)
+LogMsg(const char *fmt, ...)
{
- int error_number = errno;
+ va_list args;
- if (error_number) {
- fprintf(stderr, "%s: ", program);
- fprintf(stderr, "%s\n", strerror(error_number));
- }
- fprintf(stderr, "%s: ", program);
- fprintf(stderr, x0, x1);
- fprintf(stderr, "\n");
+ va_start(args, fmt);
+ vLogMsg(fmt, args);
+ va_end(args);
}
void
-showargs(char **argv)
+showargs(const char **argv)
{
for (; *argv; argv++)
fprintf(stderr, "%s ", *argv);
@@ -718,7 +729,7 @@ showargs(char **argv)
#define ImakefileCHeader "/* imake - temporary file */"
void
-CheckImakefileC(char *masterc)
+CheckImakefileC(const char *masterc)
{
char mkcbuf[1024];
FILE *inFile;
@@ -745,7 +756,7 @@ CheckImakefileC(char *masterc)
#define OverrideWarning "Warning: local file \"%s\" overrides global macros."
boolean
-optional_include(FILE *inFile, char *defsym, char *fname)
+optional_include(FILE *inFile, const char *defsym, const char *fname)
{
errno = 0;
if (access(fname, R_OK) == 0) {
@@ -757,7 +768,7 @@ optional_include(FILE *inFile, char *defsym, char *fname)
}
void
-doit(FILE *outfd, char *cmd, char **argv)
+doit(FILE *outfd, const char *cmd, const char **argv)
{
int pid;
waitType status;
@@ -772,18 +783,18 @@ doit(FILE *outfd, char *cmd, char **argv)
if (status < 0)
LogFatal("Cannot spawn %s.", cmd);
if (status > 0)
- LogFatalI("Exit code %d.", status);
+ LogFatal("Exit code %d.", status);
#else
pid = fork();
if (pid < 0)
- LogFatal("Cannot fork.", "");
+ LogFatal("Cannot fork.");
if (pid) { /* parent... simply wait */
while (wait(&status) > 0) {
errno = 0;
if (WIFSIGNALED(status))
- LogFatalI("Signal %d.", waitSig(status));
+ LogFatal("Signal %d.", waitSig(status));
if (WIFEXITED(status) && waitCode(status))
- LogFatalI("Exit code %d.", waitCode(status));
+ LogFatal("Exit code %d.", waitCode(status));
}
}
else { /* child... dup and exec cmd */
@@ -799,7 +810,7 @@ doit(FILE *outfd, char *cmd, char **argv)
#if !defined WIN32
static void
-parse_utsname(struct utsname *name, char *fmt, char *result, char *msg)
+parse_utsname(struct utsname *name, const char *fmt, char *result, const char *msg)
{
char buf[SYS_NMLN * 5 + 1];
char *ptr = buf;
@@ -859,7 +870,7 @@ parse_utsname(struct utsname *name, char *fmt, char *result, char *msg)
/* Just in case... */
if (strlen(buf) >= sizeof(buf))
- LogFatal("Buffer overflow parsing uname.", "");
+ LogFatal("Buffer overflow parsing uname.");
/* Parse the buffer. The sscanf() return value is rarely correct. */
*result = '\0';
@@ -1035,9 +1046,9 @@ get_distrib(FILE *inFile)
{
struct stat sb;
- static char* suse = "/etc/SuSE-release";
- static char* redhat = "/etc/redhat-release";
- static char* debian = "/etc/debian_version";
+ static const char* suse = "/etc/SuSE-release";
+ static const char* redhat = "/etc/redhat-release";
+ static const char* debian = "/etc/debian_version";
fprintf (inFile, "%s\n", "#define LinuxUnknown 0");
fprintf (inFile, "%s\n", "#define LinuxSuSE 1");
@@ -1224,7 +1235,6 @@ get_sun_compiler_versions (FILE *inFile)
{
const char* sunpro_path = "/opt/SUNWspro/bin";
int cmajor, cminor, found = 0;
- struct stat sb;
/* If cross-compiling, only check CrossCompilerDir for compilers.
* If not cross-compiling, first check cc in users $PATH,
@@ -1327,7 +1337,7 @@ static boolean
get_gcc(char *cmd)
{
struct stat sb;
- static char* gcc_path[] = {
+ static const char* gcc_path[] = {
#if defined(linux) || \
defined(__NetBSD__) || \
defined(__OpenBSD__) || \
@@ -1346,7 +1356,7 @@ get_gcc(char *cmd)
};
#ifdef CROSSCOMPILE
- static char* cross_cc_name[] = {
+ static const char* cross_cc_name[] = {
"cc",
"gcc"
};
@@ -1426,7 +1436,7 @@ define_os_defaults(FILE *inFile)
# endif
{
if (uname(&uts_name) < 0)
- LogFatal("Cannot invoke uname", "");
+ LogFatal("Cannot invoke uname");
else
name = &uts_name;
}
@@ -1680,8 +1690,8 @@ define_os_defaults(FILE *inFile)
}
void
-cppit(char *imakefile, char *template, char *masterc,
- FILE *outfd, char *outfname)
+cppit(const char *imakefile, const char *template, const char *masterc,
+ FILE *outfd, const char *outfname)
{
FILE *inFile;
@@ -1714,8 +1724,8 @@ makeit(void)
doit(NULL, make_argv[0], make_argv);
}
-char *
-CleanCppInput(char *imakefile)
+const char *
+CleanCppInput(const char *imakefile)
{
FILE *outFile = NULL;
FILE *inFile;
@@ -1772,25 +1782,26 @@ CleanCppInput(char *imakefile)
#ifdef HAVE_MKSTEMP
int fd;
#endif
- tmpImakefile = Strdup(tmpImakefile);
+ char *tmpImakefileName = Strdup(tmpImakefileTemplate);
#ifndef HAVE_MKSTEMP
- if (mktemp(tmpImakefile) == NULL ||
- (outFile = fopen(tmpImakefile, "w+")) == NULL) {
+ if (mktemp(tmpImakefileName) == NULL ||
+ (outFile = fopen(tmpImakefileName, "w+")) == NULL) {
LogFatal("Cannot open %s for write.",
- tmpImakefile);
+ tmpImakefileName);
}
#else
- fd=mkstemp(tmpImakefile);
+ fd=mkstemp(tmpImakefileName);
if (fd != -1)
outFile = fdopen(fd, "w");
if (outFile == NULL) {
if (fd != -1) {
- unlink(tmpImakefile); close(fd);
+ unlink(tmpImakefileName); close(fd);
}
LogFatal("Cannot open %s for write.",
- tmpImakefile);
+ tmpImakefileName);
}
#endif
+ tmpImakefile = tmpImakefileName;
}
writetmpfile(outFile, punwritten, pbuf-punwritten,
tmpImakefile);
@@ -1815,7 +1826,7 @@ CleanCppInput(char *imakefile)
}
void
-CleanCppOutput(FILE *tmpfd, char *tmpfname)
+CleanCppOutput(FILE *tmpfd, const char *tmpfname)
{
char *input;
int blankline = 0;
@@ -1937,7 +1948,7 @@ isempty(char *line)
/*ARGSUSED*/
char *
-ReadLine(FILE *tmpfd, char *tmpfname)
+ReadLine(FILE *tmpfd, const char *tmpfname)
{
static boolean initialized = FALSE;
static char *buf, *pline, *end;
@@ -2011,7 +2022,7 @@ ReadLine(FILE *tmpfd, char *tmpfname)
}
void
-writetmpfile(FILE *fd, char *buf, int cnt, char *fname)
+writetmpfile(FILE *fd, const char *buf, int cnt, const char *fname)
{
if (fwrite(buf, sizeof(char), cnt, fd) == -1)
LogFatal("Cannot write to %s.", fname);
@@ -2023,7 +2034,7 @@ Emalloc(int size)
char *p;
if ((p = malloc(size)) == NULL)
- LogFatalI("Cannot allocate %d bytes", size);
+ LogFatal("Cannot allocate %d bytes", size);
return(p);
}
@@ -2134,7 +2145,7 @@ KludgeResetRule(void)
}
#endif
char *
-Strdup(char *cp)
+Strdup(const char *cp)
{
char *new = Emalloc(strlen(cp) + 1);
diff --git a/imake/imake.man b/imake/imake.man
index 76dad22..aa4ad36 100644
--- a/imake/imake.man
+++ b/imake/imake.man
@@ -5,10 +5,10 @@
.\" the above copyright notice appear in all copies and that both that
.\" copyright notice and this permission notice appear in supporting
.\" documentation.
-.\"
+.\"
.\" 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.
@@ -16,7 +16,7 @@
.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
.\" OTHER DEALINGS IN THE SOFTWARE.
-.\"
+.\"
.\" Except as contained in this notice, the name of The 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
@@ -27,14 +27,14 @@
imake \- C preprocessor interface to the make utility
.SH SYNOPSIS
\fBimake\fP [ \fB\-D\fP\fIdefine\fP ] [ \fB\-I\fP\fIdir\fP ]
-[ \fB\-U\fP\fIdefine\fP ]
+[ \fB\-U\fP\fIdefine\fP ]
[ \fB\-T\fP\fItemplate\fP ]
[ \fB\-f\fP \fIfilename\fP ] [ \fB\-C\fP \fIfilename\fP ]
[ \fB\-s\fP \fIfilename\fP ] [ \fB\-e\fP ]
[ \fB\-v\fP ]
.SH DESCRIPTION
.I Imake
-is used to
+is used to
generate \fIMakefiles\fP from a template, a set of \fIcpp\fP macro functions,
and a per-directory input file called an \fIImakefile\fP. This allows machine
dependencies (such as compiler options, alternate command names, and special
@@ -47,11 +47,11 @@ The following command line options may be passed to \fIimake\fP:
This option is passed directly to \fIcpp\fP. It is typically used to set
directory-specific variables. For example, the X Window System used this
flag to set \fITOPDIR\fP to the name of the directory containing the top
-of the core distribution and \fICURDIR\fP to the name of the current
+of the core distribution and \fICURDIR\fP to the name of the current
directory, relative to the top.
.TP 8
.B \-I\fIdirectory\fP
-This option is passed directly to \fIcpp\fP. It is typically used to
+This option is passed directly to \fIcpp\fP. It is typically used to
indicate the directory in which the \fIimake\fP template and configuration
files may be found.
.TP 8
@@ -73,9 +73,9 @@ This option specifies the name of the .c file that is constructed in the
current directory. The default is \fIImakefile.c\fP.
.TP 8
.B \-s \fIfilename\fP
-This option specifies the name of the \fImake\fP description file to be
+This option specifies the name of the \fImake\fP description file to be
generated but \fImake\fP should not be invoked.
-If the \fIfilename\fP is a dash (\-), the
+If the \fIfilename\fP is a dash (\-), the
output is written to \fIstdout\fP. The default is to generate, but
not execute, a \fIMakefile\fP.
.TP 8
@@ -84,7 +84,7 @@ This option indicates the \fIimake\fP should execute the generated
\fIMakefile\fP. The default is to leave this to the user.
.TP 8
.B \-v
-This option indicates that \fIimake\fP should print the \fIcpp\fP command line
+This option indicates that \fIimake\fP should print the \fIcpp\fP command line
that it is using to generate the \fIMakefile\fP.
.SH "HOW IT WORKS"
\fIImake\fP invokes \fIcpp\fP with any \fI\-I\fP or \fI\-D\fP flags passed
@@ -97,16 +97,16 @@ following 3 lines:
\& #include IMAKE_TEMPLATE
.fi
.sp
-where \fIImake.tmpl\fP and \fIImakefile\fP may be overridden by the
+where \fIImake.tmpl\fP and \fIImakefile\fP may be overridden by the
\fI\-T\fP and \fI\-f\fP command options, respectively.
.PP
The IMAKE_TEMPLATE typically
-reads in a file containing machine-dependent parameters
+reads in a file containing machine-dependent parameters
(specified as \fIcpp\fP symbols), a site-specific parameters file,
a file defining variables,
a file
containing \fIcpp\fP macro functions for generating \fImake\fP rules, and
-finally the \fIImakefile\fP (specified by INCLUDE_IMAKEFILE) in the current
+finally the \fIImakefile\fP (specified by INCLUDE_IMAKEFILE) in the current
directory. The \fIImakefile\fP uses the macro functions to indicate what
targets should be built; \fIimake\fP takes care of generating the appropriate
rules.
@@ -124,9 +124,9 @@ By convention make variables are upper case.
.PP
The rules file (usually named \fIImake.rules\fP in the configuration
directory) contains a variety of \fIcpp\fP macro functions that are
-configured according to the current platform. \fIImake\fP replaces
+configured according to the current platform. \fIImake\fP replaces
any occurrences of the string ``@@'' with a newline to allow macros that
-generate more than one line of \fImake\fP rules.
+generate more than one line of \fImake\fP rules.
For example, the macro
.ta 1i 1.6i 5i
.nf
diff --git a/imake/imakemdep.h b/imake/imakemdep.h
index 5f897f2..458849a 100644
--- a/imake/imakemdep.h
+++ b/imake/imakemdep.h
@@ -366,7 +366,7 @@ in this Software without prior written authorization from The Open Group.
# define ARGUMENTS 50 /* number of arguments in various arrays */
# if !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP)
-char *cpp_argv[ARGUMENTS] = {
+const char *cpp_argv[ARGUMENTS] = {
"cc", /* replaced by the actual program to exec */
"-I.", /* add current directory to include path */
# if !defined(__NetBSD_Version__) || __NetBSD_Version__ < 103080000
diff --git a/imake/makeg.man b/imake/makeg.man
index ac75b0d..09fa321 100644
--- a/imake/makeg.man
+++ b/imake/makeg.man
@@ -1,14 +1,14 @@
.\" Copyright (c) 1996, 1998 The Open Group
-.\"
+.\"
.\" Permission to use, copy, modify, distribute, and sell this software and its
.\" documentation for any purpose is hereby granted without fee, provided that
.\" the above copyright notice appear in all copies and that both that
.\" copyright notice and this permission notice appear in supporting
.\" documentation.
-.\"
+.\"
.\" 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.
@@ -16,7 +16,7 @@
.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
.\" OTHER DEALINGS IN THE SOFTWARE.
-.\"
+.\"
.\" Except as contained in this notice, the name of The 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
diff --git a/imake/mdepend.cpp b/imake/mdepend.cpp
index 4998206..c1f5f57 100644
--- a/imake/mdepend.cpp
+++ b/imake/mdepend.cpp
@@ -78,7 +78,7 @@ do
*)
if [ "$endmarker"x = x ]; then
- case "$1" in
+ case "$1" in
-w)
width="$2"
shift
@@ -103,7 +103,7 @@ do
objsuffix="$2"
shift
;;
-
+
--*)
echo "$1" | sed 's/^\-\-//' >${TMP}end
endmarker="`cat ${TMP}end`"
@@ -176,7 +176,7 @@ case "$makefile" in
;;
esac
-if [ "$verbose"x = "y"x ]; then
+if [ "$verbose"x = "y"x ]; then
cat $CPPCMD
fi
diff --git a/imake/mergelib.cpp b/imake/mergelib.cpp
index 173c023..afb4a91 100644
--- a/imake/mergelib.cpp
+++ b/imake/mergelib.cpp
@@ -1,29 +1,29 @@
XCOMM!/bin/sh
XCOMM
XCOMM Copyright (c) 1989, 1998 The Open Group
-XCOMM
-XCOMM Permission to use, copy, modify, distribute, and sell this software and
+XCOMM
+XCOMM Permission to use, copy, modify, distribute, and sell this software and
XCOMM its documentation for any purpose is hereby granted without fee, provided
XCOMM that the above copyright notice appear in all copies and that both that
XCOMM copyright notice and this permission notice appear in supporting
XCOMM documentation.
-XCOMM
+XCOMM
XCOMM The above copyright notice and this permission notice shall be included in
XCOMM all copies or substantial portions of the Software.
-XCOMM
+XCOMM
XCOMM THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
XCOMM IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
XCOMM FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
XCOMM OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
XCOMM AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
XCOMM CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-XCOMM
+XCOMM
XCOMM Except as contained in this notice, the name of The Open Group shall not be
XCOMM used in advertising or otherwise to promote the sale, use or other dealings
XCOMM in this Software without prior written authorization from The Open Group.
-XCOMM
+XCOMM
XCOMM Author: Jim Fulton, MIT X Consortium
-XCOMM
+XCOMM
XCOMM mergelib - merge one library into another; this is commonly used by X
XCOMM to add the extension library into the base Xlib.
XCOMM
@@ -52,7 +52,7 @@ fi
XCOMM
-XCOMM Create a temp directory, and figure out how to reference the
+XCOMM Create a temp directory, and figure out how to reference the
XCOMM object files from it (i.e. relative vs. absolute path names).
XCOMM
diff --git a/imake/mkdirhier.man b/imake/mkdirhier.man
index fe86f96..b890588 100644
--- a/imake/mkdirhier.man
+++ b/imake/mkdirhier.man
@@ -1,25 +1,25 @@
.\" Copyright (c) 1993, 1994, 1998 The Open Group
-.\"
+.\"
.\" Permission to use, copy, modify, distribute, and sell this software and its
.\" documentation for any purpose is hereby granted without fee, provided that
.\" the above copyright notice appear in all copies and that both that
.\" copyright notice and this permission notice appear in supporting
.\" documentation.
-.\"
+.\"
.\" 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 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
+.\" 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.
-.\"
-.\" 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
-.\" dealing in this Software without prior written authorization from The
+.\"
+.\" 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
+.\" dealing in this Software without prior written authorization from The
.\" Open Group.
.\"
.TH MKDIRHIER 1 __xorgversion__
diff --git a/imake/mkhtmlindex.man b/imake/mkhtmlindex.man
index fc8a427..14d6689 100644
--- a/imake/mkhtmlindex.man
+++ b/imake/mkhtmlindex.man
@@ -24,9 +24,9 @@ This utility is currently rather specific to X manual pages.
In particular, the format of the index files it outputs is not configurable,
nor is the HTML formatting it expects of manual pages.
.SH AUTHOR
-The version of the
+The version of the
.I mkhtmlindex
-included in this X.Org Foundation release was originally written
+included in this X.Org Foundation release was originally written
by David Dawes wrote as a part of XFree86.
.PP
Colin Watson wrote this manual page, originally for the Debian Project.
diff --git a/imake/xmkmf.cpp b/imake/xmkmf.cpp
index 69b5a0f..a78a501 100644
--- a/imake/xmkmf.cpp
+++ b/imake/xmkmf.cpp
@@ -27,7 +27,7 @@ do
esac
done
-case $# in
+case $# in
0) ;;
1) topdir=$1 ;;
2) topdir=$1 curdir=$2 ;;
@@ -38,7 +38,7 @@ case "$topdir" in
-*) echo "$usage" 1>&2; exit 1 ;;
esac
-if [ -f Makefile ]; then
+if [ -f Makefile ]; then
echo mv -f Makefile Makefile.bak
mv -f Makefile Makefile.bak
fi
@@ -52,7 +52,7 @@ fi
echo imake $imake_defines $args
case "$do_all" in
yes)
- imake $imake_defines $args &&
+ imake $imake_defines $args &&
echo "make Makefiles" &&
make Makefiles &&
echo "make includes" &&
diff --git a/imake/xmkmf.man b/imake/xmkmf.man
index 342fcc5..c61e2b0 100644
--- a/imake/xmkmf.man
+++ b/imake/xmkmf.man
@@ -1,25 +1,25 @@
.\" Copyright (c) 1993, 1994, 1998 The Open Group
-.\"
+.\"
.\" Permission to use, copy, modify, distribute, and sell this software and its
.\" documentation for any purpose is hereby granted without fee, provided that
.\" the above copyright notice appear in all copies and that both that
.\" copyright notice and this permission notice appear in supporting
.\" documentation.
-.\"
+.\"
.\" 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 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
+.\" 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.
-.\"
-.\" 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
-.\" dealing in this Software without prior written authorization from The
+.\"
+.\" 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
+.\" dealing in this Software without prior written authorization from The
.\" Open Group.
.\"
.TH XMKMF 1 __xorgversion__
@@ -36,7 +36,7 @@ xmkmf \- create a Makefile from an Imakefile
The
.I xmkmf
command is the normal way to create a
-.I Makefile
+.I Makefile
from an
.I Imakefile
shipped with third-party software.
@@ -47,8 +47,8 @@ the
.I imake
program is run with arguments appropriate for your system
(configured into
-.I xmkmf
-when X was built) and generates a
+.I imake
+when it was built) and generates a
.I Makefile.
.PP
When invoked with the
@@ -61,14 +61,13 @@ in the current directory, and then automatically executes
``make Makefiles'' (in case there are subdirectories),
``make includes'',
and ``make depend'' for you.
-This is the normal way to configure software that is outside
-the X Consortium build tree.
.PP
-If working inside the X Consortium build tree (unlikely unless you
-are an X developer, and even then this option is never really used), the
+If a
.I topdir
-argument should be specified as the relative pathname from the
-current directory to the top of the build tree. Optionally,
+is given,
+.I xmkmf
+assumes nothing is installed on your system and looks for files in
+the build tree instead of using the installed versions. Optionally,
.I curdir
may be specified as a relative pathname from the top of the build
tree to the current directory. It is necessary to supply
@@ -76,11 +75,5 @@ tree to the current directory. It is necessary to supply
if the current directory has subdirectories, or the
.I Makefile
will not be able to build the subdirectories.
-If a
-.I topdir
-is given,
-.I xmkmf
-assumes nothing is installed on your system and looks for files in
-the build tree instead of using the installed versions.
.SH "SEE ALSO"
imake(1)