summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Hooker <sarvatt@ubuntu.com>2012-03-08 16:14:51 -0500
committerRobert Hooker <sarvatt@ubuntu.com>2012-03-08 16:14:51 -0500
commit5414f0c8bef39f953d5eef5e12328c44ed2b1070 (patch)
tree0ad61f3df7f5c9f507d1da1646eb3d4cb0b0c9c9
parentb1733cf8649f2e2ef4bc07cb8e5c33bdc329e2cd (diff)
downloadxutils-dev-5414f0c8bef39f953d5eef5e12328c44ed2b1070.tar.gz
makedepend 1.0.4
-rw-r--r--debian/changelog3
-rw-r--r--debian/versions1
-rw-r--r--makedepend/ChangeLog79
-rw-r--r--makedepend/Makefile.in4
-rw-r--r--makedepend/README25
-rw-r--r--makedepend/aclocal.m41025
-rw-r--r--[-rwxr-xr-x]makedepend/config.guess18
-rw-r--r--[-rwxr-xr-x]makedepend/config.sub76
-rwxr-xr-xmakedepend/configure5724
-rw-r--r--makedepend/configure.ac2
-rw-r--r--makedepend/def.h49
-rw-r--r--makedepend/ifparser.c26
-rw-r--r--makedepend/ifparser.h26
-rw-r--r--makedepend/imakemdep.h4
-rw-r--r--makedepend/include.c16
-rw-r--r--makedepend/main.c20
-rw-r--r--makedepend/makedepend.man32
-rw-r--r--makedepend/parse.c62
-rw-r--r--makedepend/pr.c11
-rwxr-xr-xmakedepend/tests/28045/makedep.sh2
20 files changed, 6799 insertions, 406 deletions
diff --git a/debian/changelog b/debian/changelog
index 2ee93e1..6160871 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,8 +3,9 @@ xutils-dev (1:7.6+7) UNRELEASED; urgency=low
* util-macros 1.16.0 (superseded)
* util-macros 1.16.2
* imake 1.0.5
+ * makedepend 1.0.4
- -- Robert Hooker <sarvatt@ubuntu.com> Mon, 05 Mar 2012 10:52:03 -0500
+ -- Robert Hooker <sarvatt@ubuntu.com> Thu, 08 Mar 2012 16:13:52 -0500
xutils-dev (1:7.6+6) unstable; urgency=low
diff --git a/debian/versions b/debian/versions
index f2ebde3..b38287b 100644
--- a/debian/versions
+++ b/debian/versions
@@ -35,6 +35,7 @@ lndir | Debian
makedepend | Debian
------------------------
+1.0.4 | 1:7.6+7
1.0.3 | 1:7.5+5
1.0.2 | 1:7.5+4
diff --git a/makedepend/ChangeLog b/makedepend/ChangeLog
index 8c05086..60d855a 100644
--- a/makedepend/ChangeLog
+++ b/makedepend/ChangeLog
@@ -1,3 +1,82 @@
+commit b6605e3945eaaabbd090672f33e888d394f9a4f0
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Wed Mar 7 21:52:14 2012 -0800
+
+ makedepend 1.0.4
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit cb8bbc06de0baf2dff4a703e6d2bb47bdf90d896
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Oct 7 18:07:24 2011 -0700
+
+ define(): Avoid assigning constant string to non-const char *
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit b9770941ae829ad2cb985efe809d6e3dd690648b
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Oct 7 18:02:34 2011 -0700
+
+ Call strdup directly, instead of via copy macro
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 0ecf5f3251033ab6efa1a0d881f75ed9ce60b5a4
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Oct 7 18:00:39 2011 -0700
+
+ Add const attributes to fix gcc -Wwrite-strings warnings
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 97ae52f80f9e382917889bde1913367572e89012
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Oct 7 17:47:36 2011 -0700
+
+ Move extern variable declarations to common header (def.h)
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 3602fb0b7ba2bde9c73610693dbb50534fe42b81
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Oct 7 17:34:17 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 c1f32dc1d4c1758065468e1f5d34707099f59f33
+Author: Stuart Kreitman <Stuart.Kreitman@Oracle.COM>
+Date: Mon May 24 14:21:21 2010 -0700
+
+ Raise MAXFILES from 1024 to 2048
+
+ Required in order to build OpenTTD on Solaris
+ http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6917536
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit cc23acdd80fa0cad53e46f99cd0ff5998ec7f607
+Author: Cyril Brulebois <kibi@debian.org>
+Date: Sun Oct 31 15:50:36 2010 +0100
+
+ Fix bashism: shell string comparison is =, not ==.
+
+ Signed-off-by: Cyril Brulebois <kibi@debian.org>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 186aae76a84860d0efef638ff499ab1968fffd75
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Oct 29 22:53:25 2010 -0700
+
+ Add README with pointers to mailing list, bugzilla & git repos
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
commit e67389ecc0c425bcfec0a3184ee48919e0e2c61a
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Oct 29 22:45:35 2010 -0700
diff --git a/makedepend/Makefile.in b/makedepend/Makefile.in
index bc054f2..8a93194 100644
--- a/makedepend/Makefile.in
+++ b/makedepend/Makefile.in
@@ -37,7 +37,7 @@ build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = makedepend$(EXEEXT)
subdir = .
-DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/makedepend-config.h.in \
$(top_srcdir)/configure AUTHORS COPYING ChangeLog config.guess \
config.sub depcomp install-sh missing
@@ -128,6 +128,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BASE_CFLAGS = @BASE_CFLAGS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -182,6 +183,7 @@ PKG_CONFIG = @PKG_CONFIG@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
+STRICT_CFLAGS = @STRICT_CFLAGS@
STRIP = @STRIP@
VERSION = @VERSION@
XORG_MAN_PAGE = @XORG_MAN_PAGE@
diff --git a/makedepend/README b/makedepend/README
new file mode 100644
index 0000000..4376dcd
--- /dev/null
+++ b/makedepend/README
@@ -0,0 +1,25 @@
+makedepend - create dependencies in makefiles
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+ http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+ https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+ git://anongit.freedesktop.org/git/xorg/util/makedepend
+
+ http://cgit.freedesktop.org/xorg/util/makedepend
+
+For patch submission instructions, see:
+
+ http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+ http://wiki.x.org/wiki/GitPage
+
diff --git a/makedepend/aclocal.m4 b/makedepend/aclocal.m4
index b3cda21..3f44a68 100644
--- a/makedepend/aclocal.m4
+++ b/makedepend/aclocal.m4
@@ -988,6 +988,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.
@@ -1027,7 +1183,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,,
@@ -1054,7 +1210,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
@@ -1072,7 +1228,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
@@ -1422,6 +1578,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
@@ -1667,10 +1940,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
@@ -1690,7 +1964,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[)]),
@@ -1719,6 +1993,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
@@ -1801,12 +2091,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])
@@ -1878,6 +2168,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
@@ -1894,18 +2429,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])
@@ -2031,59 +2564,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
@@ -2094,6 +2864,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
@@ -2185,159 +2956,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/makedepend/config.guess b/makedepend/config.guess
index dc84c68..2852378 100755..100644
--- a/makedepend/config.guess
+++ b/makedepend/config.guess
@@ -1,10 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
# Free Software Foundation, Inc.
-timestamp='2009-11-20'
+timestamp='2010-08-21'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -56,8 +56,9 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -91,7 +92,7 @@ if test $# != 0; then
exit 1
fi
-trap 'exit 1' 1 2 15
+trap 'exit 1' HUP INT TERM
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
@@ -105,7 +106,7 @@ trap 'exit 1' 1 2 15
set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
@@ -551,7 +552,7 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit ;;
- *:AIX:*:[456])
+ *:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
@@ -967,6 +968,9 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-tilera-linux-gnu
+ exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
diff --git a/makedepend/config.sub b/makedepend/config.sub
index 2a55a50..320e303 100755..100644
--- a/makedepend/config.sub
+++ b/makedepend/config.sub
@@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
# Free Software Foundation, Inc.
-timestamp='2009-11-20'
+timestamp='2010-09-11'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -75,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -123,8 +124,9 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
@@ -281,6 +283,7 @@ case $basic_machine in
| moxie \
| mt \
| msp430 \
+ | nds32 | nds32le | nds32be \
| nios | nios2 \
| ns16k | ns32k \
| or32 \
@@ -294,7 +297,7 @@ case $basic_machine in
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu | strongarm \
- | tahoe | thumb | tic4x | tic80 | tron \
+ | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e \
| we32k \
@@ -302,6 +305,15 @@ case $basic_machine in
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
@@ -333,7 +345,7 @@ case $basic_machine in
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
@@ -367,6 +379,7 @@ case $basic_machine in
| mmix-* \
| mt-* \
| msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
| nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
@@ -380,7 +393,8 @@ case $basic_machine in
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile-* | tilegx-* \
| tron-* \
| ubicom32-* \
| v850-* | v850e-* | vax-* \
@@ -480,6 +494,15 @@ case $basic_machine in
basic_machine=powerpc-ibm
os=-cnk
;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
c90)
basic_machine=c90-cray
os=-unicos
@@ -839,6 +862,12 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@@ -1073,17 +1102,10 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
- tic54x | c54x*)
- basic_machine=tic54x-unknown
- os=-coff
- ;;
- tic55x | c55x*)
- basic_machine=tic55x-unknown
- os=-coff
- ;;
- tic6x | c6x*)
- basic_machine=tic6x-unknown
- os=-coff
+ # This must be matched before tile*.
+ tilegx*)
+ basic_machine=tilegx-unknown
+ os=-linux-gnu
;;
tile*)
basic_machine=tile-unknown
@@ -1294,7 +1316,8 @@ case $os in
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -mingw32* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1435,6 +1458,8 @@ case $os in
-dicos*)
os=-dicos
;;
+ -nacl*)
+ ;;
-none)
;;
*)
@@ -1475,6 +1500,15 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
diff --git a/makedepend/configure b/makedepend/configure
index 9d9ac8f..1f75589 100755
--- a/makedepend/configure
+++ b/makedepend/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for makedepend 1.0.3.
+# Generated by GNU Autoconf 2.68 for makedepend 1.0.4.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@@ -561,8 +561,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='makedepend'
PACKAGE_TARNAME='makedepend'
-PACKAGE_VERSION='1.0.3'
-PACKAGE_STRING='makedepend 1.0.3'
+PACKAGE_VERSION='1.0.4'
+PACKAGE_STRING='makedepend 1.0.4'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
PACKAGE_URL=''
@@ -640,7 +640,9 @@ build
INSTALL_CMD
PKG_CONFIG
CHANGELOG_CMD
+STRICT_CFLAGS
CWARNFLAGS
+BASE_CFLAGS
EGREP
GREP
CPP
@@ -725,6 +727,7 @@ ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_dependency_tracking
+enable_selective_werror
enable_strict_compilation
enable_silent_rules
with_lint
@@ -1286,7 +1289,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 makedepend 1.0.3 to adapt to many kinds of systems.
+\`configure' configures makedepend 1.0.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1356,7 +1359,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of makedepend 1.0.3:";;
+ short | recursive ) echo "Configuration of makedepend 1.0.4:";;
esac
cat <<\_ACEOF
@@ -1366,6 +1369,9 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--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)
@@ -1460,7 +1466,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-makedepend configure 1.0.3
+makedepend configure 1.0.4
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1784,7 +1790,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 makedepend $as_me 1.0.3, which was
+It was created by makedepend $as_me 1.0.4, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2599,7 +2605,7 @@ fi
# Define the identity of the package.
PACKAGE='makedepend'
- VERSION='1.0.3'
+ VERSION='1.0.4'
cat >>confdefs.h <<_ACEOF
@@ -4211,6 +4217,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.
@@ -4469,31 +4501,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
@@ -4504,30 +9753,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
+
+
@@ -5650,7 +11288,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 makedepend $as_me 1.0.3, which was
+This file was extended by makedepend $as_me 1.0.4, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5716,7 +11354,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="\\
-makedepend config.status 1.0.3
+makedepend config.status 1.0.4
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/makedepend/configure.ac b/makedepend/configure.ac
index ca7c115..0824a2b 100644
--- a/makedepend/configure.ac
+++ b/makedepend/configure.ac
@@ -1,5 +1,5 @@
AC_PREREQ([2.60])
-AC_INIT([makedepend], [1.0.3],
+AC_INIT([makedepend], [1.0.4],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_CONFIG_HEADER([makedepend-config.h])
diff --git a/makedepend/def.h b/makedepend/def.h
index fba0a0a..3f55a52 100644
--- a/makedepend/def.h
+++ b/makedepend/def.h
@@ -40,7 +40,7 @@ in this Software without prior written authorization from The Open Group.
#include <sys/stat.h>
#define MAXDEFINES 512
-#define MAXFILES 1024
+#define MAXFILES 2048
#define MAXINCFILES 128 /* "-include" files */
#define MAXDIRS 64
#define SYMTABINC 10 /* must be > 1 for define() to work right */
@@ -76,7 +76,7 @@ in this Software without prior written authorization from The Open Group.
extern int _debugmask;
/*
* debug levels are:
- *
+ *
* 0 show ifn*(def)*,endif
* 1 trace defined/!defined
* 2 show #include
@@ -130,17 +130,16 @@ struct filepointer {
#include <stdlib.h>
-#define copy(s) strdup(s)
int match(const char *str, const char * const *list);
char *base_name(const char *file);
char *getnextline(struct filepointer *fp);
-struct symtab **slookup(char *symbol, struct inclist *file);
-struct symtab **isdefined(char *symbol, struct inclist *file,
+struct symtab **slookup(const char *symbol, struct inclist *file);
+struct symtab **isdefined(const char *symbol, struct inclist *file,
struct inclist **srcfile);
-struct symtab **fdefined(char *symbol, struct inclist *file,
+struct symtab **fdefined(const char *symbol, struct inclist *file,
struct inclist **srcfile);
struct filepointer *getfile(const char *file);
-void included_by(struct inclist *ip,
+void included_by(struct inclist *ip,
struct inclist *newfile);
struct inclist *newinclude(const char *newfile,
const char *incstring);
@@ -150,20 +149,21 @@ struct inclist *inc_path(const char *file, const char *include,
void freefile(struct filepointer *fp);
-void define2(char *name, char *val, struct inclist *file);
+void define2(const char *name, const char *val,
+ struct inclist *file);
void define(char *def, struct inclist *file);
-void undefine(char *symbol, struct inclist *file);
-int find_includes(struct filepointer *filep,
- struct inclist *file,
- struct inclist *file_red,
+void undefine(const char *symbol, struct inclist *file);
+int find_includes(struct filepointer *filep,
+ struct inclist *file,
+ struct inclist *file_red,
int recursion, boolean failOK);
-void recursive_pr_include(struct inclist *head,
+void recursive_pr_include(struct inclist *head,
const char *file,
const char *base);
-void add_include(struct filepointer *filep,
- struct inclist *file,
- struct inclist *file_red,
+void add_include(struct filepointer *filep,
+ struct inclist *file,
+ struct inclist *file_red,
const char *include, int type,
boolean failOK);
@@ -176,3 +176,20 @@ int cppsetup(const char *filename,
extern void fatalerr(const char *, ...) _X_ATTRIBUTE_PRINTF(1, 2);
extern void warning(const char *, ...) _X_ATTRIBUTE_PRINTF(1, 2);
extern void warning1(const char *, ...) _X_ATTRIBUTE_PRINTF(1, 2);
+
+extern struct inclist inclist[ MAXFILES ];
+extern struct inclist *inclistp;
+extern struct inclist *inclistnext;
+extern struct inclist maininclist;
+extern const char *includedirs[ ];
+extern const char **includedirsnext;
+extern const char * const directives[];
+extern char *notdotdot[ ];
+
+extern const char *objprefix;
+extern const char *objsuffix;
+extern int width;
+extern boolean printed;
+extern boolean verbose;
+extern boolean show_where_not;
+extern boolean warn_multiple;
diff --git a/makedepend/ifparser.c b/makedepend/ifparser.c
index 788fa14..0efa550 100644
--- a/makedepend/ifparser.c
+++ b/makedepend/ifparser.c
@@ -1,7 +1,7 @@
/*
*
* Copyright 1992 Network Computing Devices, Inc.
- *
+ *
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
* that the above copyright notice appear in all copies and that both that
@@ -11,7 +11,7 @@
* without specific, written prior permission. Network Computing Devices makes
* no representations about the suitability of this software for any purpose.
* It is provided ``as is'' without express or implied warranty.
- *
+ *
* NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
* IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE FOR ANY SPECIAL,
@@ -19,19 +19,19 @@
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
- *
+ *
* Author: Jim Fulton
* Network Computing Devices, Inc.
- *
+ *
* Simple if statement processor
*
* This module can be used to evaluate string representations of C language
* if constructs. It accepts the following grammar:
- *
+ *
* EXPRESSION := VALUE
* | VALUE BINOP EXPRESSION
* | VALUE '?' EXPRESSION ':' EXPRESSION
- *
+ *
* VALUE := '(' EXPRESSION ')'
* | '!' VALUE
* | '-' VALUE
@@ -42,7 +42,7 @@
* | # variable '(' variable-list ')'
* | variable
* | number
- *
+ *
* BINOP := '*' | '/' | '%'
* | '+' | '-'
* | '<<' | '>>'
@@ -50,12 +50,12 @@
* | '==' | '!='
* | '&' | '^' | '|'
* | '&&' | '||'
- *
+ *
* The normal C order of precedence is supported.
- *
- *
+ *
+ *
* External Entry Points:
- *
+ *
* ParseIfExpression parse a string for #if
*/
@@ -182,7 +182,7 @@ parse_value (IfParser *g, const char *cp, long *valp)
case '(':
DO (cp = ParseIfExpression (g, cp + 1, valp));
SKIPSPACE (cp);
- if (*cp != ')')
+ if (*cp != ')')
return CALLFUNC(g, handle_error) (g, cp, ")");
return cp + 1; /* skip the right paren */
@@ -273,7 +273,7 @@ parse_value (IfParser *g, const char *cp, long *valp)
cp++;
}
}
-
+
return cp;
}
diff --git a/makedepend/ifparser.h b/makedepend/ifparser.h
index 244d4f5..ad809d1 100644
--- a/makedepend/ifparser.h
+++ b/makedepend/ifparser.h
@@ -1,7 +1,7 @@
/*
*
* Copyright 1992 Network Computing Devices, Inc.
- *
+ *
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
* that the above copyright notice appear in all copies and that both that
@@ -11,7 +11,7 @@
* without specific, written prior permission. Network Computing Devices makes
* no representations about the suitability of this software for any purpose.
* It is provided ``as is'' without express or implied warranty.
- *
+ *
* NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
* IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE FOR ANY SPECIAL,
@@ -19,19 +19,19 @@
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
- *
+ *
* Author: Jim Fulton
* Network Computing Devices, Inc.
- *
+ *
* Simple if statement processor
*
* This module can be used to evaluate string representations of C language
* if constructs. It accepts the following grammar:
- *
+ *
* EXPRESSION := VALUE
* | VALUE BINOP EXPRESSION
* | VALUE '?' EXPRESSION ':' EXPRESSION
- *
+ *
* VALUE := '(' EXPRESSION ')'
* | '!' VALUE
* | '-' VALUE
@@ -39,7 +39,7 @@
* | 'defined' '(' variable ')'
* | variable
* | number
- *
+ *
* BINOP := '*' | '/' | '%'
* | '+' | '-'
* | '<<' | '>>'
@@ -47,12 +47,12 @@
* | '==' | '!='
* | '&' | '^' | '|'
* | '&&' | '||'
- *
+ *
* The normal C order of precedence is supported.
- *
- *
+ *
+ *
* External Entry Points:
- *
+ *
* ParseIfExpression parse a string for #if
*/
@@ -74,8 +74,8 @@ typedef struct _if_parser {
} IfParser;
const char *ParseIfExpression (
- IfParser *,
- const char *,
+ IfParser *,
+ const char *,
long *
);
diff --git a/makedepend/imakemdep.h b/makedepend/imakemdep.h
index 6a51914..b8117c8 100644
--- a/makedepend/imakemdep.h
+++ b/makedepend/imakemdep.h
@@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group.
*/
-/*
+/*
* This file contains machine-dependent constants for the imake utility.
* When porting imake, read each of the steps below and add in any necessary
* definitions. In general you should *not* edit ccimake.c or imake.c!
@@ -460,7 +460,7 @@ static const struct symtab predefs[] = {
#endif
#if defined (__BUILTIN_VA_ARG_INCR)
{"__BUILTIN_VA_ARG_INCR", "1"},
-#endif
+#endif
/* add any additional symbols before this line */
{NULL, NULL}
};
diff --git a/makedepend/include.c b/makedepend/include.c
index 0a4ad2a..4455005 100644
--- a/makedepend/include.c
+++ b/makedepend/include.c
@@ -27,14 +27,6 @@ in this Software without prior written authorization from The Open Group.
#include "def.h"
-extern struct inclist inclist[ MAXFILES ],
- *inclistp, *inclistnext;
-extern const char *includedirs[ ],
- **includedirsnext;
-extern char *notdotdot[ ];
-extern boolean show_where_not;
-extern boolean warn_multiple;
-
static boolean
isdot(const char *p)
{
@@ -64,7 +56,7 @@ issymbolic(const char *dir, const char *component)
return (TRUE);
if (lstat(buf, &st) == 0
&& (st.st_mode & S_IFMT) == S_IFLNK) {
- *pp++ = copy(buf);
+ *pp++ = strdup(buf);
if (pp >= &notdotdot[ MAXDIRS ])
fatalerr("out of .. dirs, increase MAXDIRS\n");
return(TRUE);
@@ -116,7 +108,7 @@ remove_dotdot(char *path)
char **fp = cp + 2;
char **tp = cp;
- do
+ do
*tp++ = *fp; /* move all the pointers down */
while (*fp++);
if (cp != components)
@@ -161,12 +153,12 @@ newinclude(const char *newfile, const char *incstring)
ip = inclistp++;
if (inclistp == inclist + MAXFILES - 1)
fatalerr("out of space: increase MAXFILES\n");
- ip->i_file = copy(newfile);
+ ip->i_file = strdup(newfile);
if (incstring == NULL)
ip->i_incstring = ip->i_file;
else
- ip->i_incstring = copy(incstring);
+ ip->i_incstring = strdup(incstring);
inclistnext = inclistp;
return(ip);
diff --git a/makedepend/main.c b/makedepend/main.c
index 9520fd1..bb66f82 100644
--- a/makedepend/main.c
+++ b/makedepend/main.c
@@ -99,9 +99,9 @@ const char *includedirs[ MAXDIRS + 1 ],
char *notdotdot[ MAXDIRS ];
static int cmdinc_count = 0;
static char *cmdinc_list[ 2 * MAXINCFILES ];
-char *objprefix = "";
-char *objsuffix = OBJSUFFIX;
-static char *startat = "# DO NOT DELETE";
+const char *objprefix = "";
+const char *objsuffix = OBJSUFFIX;
+static const char *startat = "# DO NOT DELETE";
int width = 78;
static boolean append = FALSE;
boolean printed = FALSE;
@@ -159,7 +159,7 @@ main(int argc, char *argv[])
char *makefile = NULL;
struct filepointer *filecontent;
const struct symtab *psymp = predefs;
- char *endmarker = NULL;
+ const char *endmarker = NULL;
char *defincdir = NULL;
char **undeflist = NULL;
int numundefs = 0, i;
@@ -356,7 +356,7 @@ main(int argc, char *argv[])
case 'm':
warn_multiple = TRUE;
break;
-
+
/* Ignore -O, -g so we can just pass ${CFLAGS} to
makedepend
*/
@@ -534,7 +534,7 @@ main(int argc, char *argv[])
/*
* eliminate \r chars from file
*/
-static int
+static int
elim_cr(char *buf, int sz)
{
int i,wp;
@@ -650,7 +650,7 @@ char *getnextline(struct filepointer *filep)
}
whitespace = TRUE;
}
-
+
if (*p == '/' && (p+1) < eof && *(p+1) == '*') {
/* Consume C comments */
*(p++) = ' ';
@@ -678,7 +678,7 @@ char *getnextline(struct filepointer *filep)
lineno++;
}
else if (*p == '?' && (p+3) < eof &&
- *(p+1) == '?' &&
+ *(p+1) == '?' &&
*(p+2) == '/' &&
*(p+3) == '\n') {
*(p++) = ' ';
@@ -714,7 +714,7 @@ char *getnextline(struct filepointer *filep)
*(p++) = '\0';
/* punt lines with just # (yacc generated) */
- for (cp = bol+1;
+ for (cp = bol+1;
*cp && (*cp == ' ' || *cp == '\t'); cp++);
if (*cp) goto done;
--p;
@@ -742,7 +742,7 @@ done:
char *base_name(const char *in_file)
{
char *p;
- char *file = copy(in_file);
+ char *file = strdup(in_file);
for(p=file+strlen(file); p>file && *p != '.'; p--) ;
if (*p == '.')
diff --git a/makedepend/makedepend.man b/makedepend/makedepend.man
index b7ee3de..9ed961a 100644
--- a/makedepend/makedepend.man
+++ b/makedepend/makedepend.man
@@ -1,24 +1,24 @@
.\" 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
+.\"
+.\" 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.
.\"
@@ -166,7 +166,7 @@ This places a definition for
in
.B makedepend's
symbol table.
-Without
+Without
.I =def\|
the symbol becomes defined as ``1''.
.TP 5
@@ -192,7 +192,7 @@ include directory; you can omit the
to simply prevent searching the standard include directories.
.TP 5
.B \-a
-Append the dependencies to the end of the file instead of replacing them.
+Append the dependencies to the end of the file instead of replacing them.
.TP 5
.B \-f\fImakefile\fP
Filename.
@@ -243,20 +243,20 @@ This option enables you to change this width.
.TP 5
.B \-v
Verbose operation.
-This option causes
+This option causes
.B makedepend
to emit the list of files included by each input file.
.TP 5
.B \-m
Warn about multiple inclusion.
-This option causes
+This option causes
.B makedepend
to produce a warning if any input file includes another file more than
-once. In previous versions of
+once. In previous versions of
.B makedepend
this was the default behavior; the default has been changed to better
match the behavior of the C compiler, which does not consider multiple
-inclusion to be an error. This option is provided for backward
+inclusion to be an error. This option is provided for backward
compatibility, and to aid in debugging problems related to multiple
inclusion.
.TP 5
diff --git a/makedepend/parse.c b/makedepend/parse.c
index fecebee..c7aad8c 100644
--- a/makedepend/parse.c
+++ b/makedepend/parse.c
@@ -26,13 +26,6 @@ in this Software without prior written authorization from The Open Group.
#include "def.h"
-extern const char * const directives[];
-extern struct inclist inclist[ MAXFILES ],
- *inclistnext,
- maininclist;
-extern const char *includedirs[ ],
- **includedirsnext;
-
static int deftype (char *line, struct filepointer *filep,
struct inclist *file_red, struct inclist *file,
int parse_it);
@@ -99,8 +92,8 @@ gobble(struct filepointer *filep, struct inclist *file,
/*
* Decide what type of # directive this line is.
*/
-static int
-deftype (char *line, struct filepointer *filep,
+static int
+deftype (char *line, struct filepointer *filep,
struct inclist *file_red, struct inclist *file, int parse_it)
{
register char *p;
@@ -210,7 +203,7 @@ deftype (char *line, struct filepointer *filep,
(*sym) -> s_name,
(*sym) -> s_value));
/* mark file as having included a 'soft include' */
- file->i_flags |= INCLUDED_SYM;
+ file->i_flags |= INCLUDED_SYM;
}
/*
@@ -258,7 +251,7 @@ deftype (char *line, struct filepointer *filep,
}
struct symtab **
-fdefined(char *symbol, struct inclist *file, struct inclist **srcfile)
+fdefined(const char *symbol, struct inclist *file, struct inclist **srcfile)
{
struct inclist **ip;
struct symtab **val;
@@ -289,7 +282,7 @@ fdefined(char *symbol, struct inclist *file, struct inclist **srcfile)
}
struct symtab **
-isdefined(char *symbol, struct inclist *file, struct inclist **srcfile)
+isdefined(const char *symbol, struct inclist *file, struct inclist **srcfile)
{
struct symtab **val;
@@ -320,7 +313,7 @@ zero_value(char *filename,
}
void
-define2(char *name, char *val, struct inclist *file)
+define2(const char *name, const char *val, struct inclist *file)
{
int first, last, below;
register struct symtab **sp = NULL, **dest;
@@ -346,8 +339,8 @@ define2(char *name, char *val, struct inclist *file)
while (last >= first)
{
/* Fast inline binary search */
- register char *s1;
- register char *s2;
+ register const char *s1;
+ register const char *s2;
register int middle = (first + last) / 2;
/* Fast inline strchr() */
@@ -357,14 +350,14 @@ define2(char *name, char *val, struct inclist *file)
if (s2[-1] == '\0') break;
/* If exact match, set sp and break */
- if (*--s1 == *--s2)
+ if (*--s1 == *--s2)
{
sp = file->i_defs + middle;
break;
}
/* If name > i_defs[middle] ... */
- if (*s1 > *s2)
+ if (*s1 > *s2)
{
below = first;
first = middle + 1;
@@ -383,7 +376,7 @@ define2(char *name, char *val, struct inclist *file)
debug(1,("redefining %s from %s to %s in file %s\n",
name, (*sp)->s_value, val, file->i_file));
free((*sp)->s_value);
- (*sp)->s_value = copy(val);
+ (*sp)->s_value = strdup(val);
return;
}
@@ -399,8 +392,8 @@ define2(char *name, char *val, struct inclist *file)
fatalerr("malloc()/realloc() failure in insert_defn()\n");
debug(1,("defining %s to %s in file %s\n", name, val, file->i_file));
- stab->s_name = copy(name);
- stab->s_value = copy(val);
+ stab->s_name = strdup(name);
+ stab->s_value = strdup(val);
*sp = stab;
}
@@ -419,12 +412,13 @@ define(char *def, struct inclist *file)
val++;
if (!*val)
- val = "1";
- define2(def, val, file);
+ define2(def, "1", file);
+ else
+ define2(def, val, file);
}
struct symtab **
-slookup(char *symbol, struct inclist *file)
+slookup(const char *symbol, struct inclist *file)
{
register int first = 0;
register int last;
@@ -433,12 +427,12 @@ slookup(char *symbol, struct inclist *file)
return NULL;
last = file->i_ndefs - 1;
-
+
while (last >= first)
{
/* Fast inline binary search */
- register char *s1;
- register char *s2;
+ register const char *s1;
+ register const char *s2;
register int middle = (first + last) / 2;
/* Fast inline strchr() */
@@ -448,13 +442,13 @@ slookup(char *symbol, struct inclist *file)
if (s2[-1] == '\0') break;
/* If exact match, we're done */
- if (*--s1 == *--s2)
+ if (*--s1 == *--s2)
{
return file->i_defs + middle;
}
/* If symbol > i_defs[middle] ... */
- if (*s1 > *s2)
+ if (*s1 > *s2)
{
first = middle + 1;
}
@@ -467,7 +461,7 @@ slookup(char *symbol, struct inclist *file)
return(NULL);
}
-static int
+static int
merge2defines(struct inclist *file1, struct inclist *file2)
{
int i;
@@ -495,7 +489,7 @@ merge2defines(struct inclist *file1, struct inclist *file2)
file2->i_file, file1->i_file));
if (deflen>0)
- {
+ {
/* make sure deflen % SYMTABINC == 0 is still true */
deflen += (SYMTABINC - deflen % SYMTABINC) % SYMTABINC;
i_defs=(struct symtab**)
@@ -530,13 +524,13 @@ merge2defines(struct inclist *file1, struct inclist *file2)
if (file1->i_defs) free(file1->i_defs);
file1->i_defs=i_defs;
file1->i_ndefs=first;
-
+
return 1;
}
}
void
-undefine(char *symbol, struct inclist *file)
+undefine(const char *symbol, struct inclist *file)
{
register struct symtab **ptr;
struct inclist *srcfile;
@@ -549,7 +543,7 @@ undefine(char *symbol, struct inclist *file)
}
int
-find_includes(struct filepointer *filep, struct inclist *file,
+find_includes(struct filepointer *filep, struct inclist *file,
struct inclist *file_red, int recursion, boolean failOK)
{
struct inclist *inclistp;
@@ -661,7 +655,7 @@ find_includes(struct filepointer *filep, struct inclist *file,
warning1(", line %ld: %s\n",
filep->f_line, line);
break;
-
+
case PRAGMA:
case IDENT:
case SCCS:
diff --git a/makedepend/pr.c b/makedepend/pr.c
index 20e3432..9c39a16 100644
--- a/makedepend/pr.c
+++ b/makedepend/pr.c
@@ -26,17 +26,8 @@ in this Software without prior written authorization from The Open Group.
#include "def.h"
-extern struct inclist inclist[ MAXFILES ],
- *inclistp;
-extern char *objprefix;
-extern char *objsuffix;
-extern int width;
-extern boolean printed;
-extern boolean verbose;
-extern boolean show_where_not;
-
void
-add_include(struct filepointer *filep, struct inclist *file,
+add_include(struct filepointer *filep, struct inclist *file,
struct inclist *file_red, const char *include, int type,
boolean failOK)
{
diff --git a/makedepend/tests/28045/makedep.sh b/makedepend/tests/28045/makedep.sh
index 322e8a0..f344b48 100755
--- a/makedepend/tests/28045/makedep.sh
+++ b/makedepend/tests/28045/makedep.sh
@@ -5,7 +5,7 @@
set -e
-if [ "x$MAKEDEPEND" == "x" ]; then
+if [ "x$MAKEDEPEND" = "x" ]; then
MAKEDEPEND=makedepend
fi