summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/macros/ChangeLog137
-rw-r--r--util/macros/Makefile.in6
-rw-r--r--util/macros/configure20
-rw-r--r--util/macros/configure.ac2
-rw-r--r--util/macros/xorg-macros.m4.in145
5 files changed, 275 insertions, 35 deletions
diff --git a/util/macros/ChangeLog b/util/macros/ChangeLog
index 54e9eaf67..2290e905e 100644
--- a/util/macros/ChangeLog
+++ b/util/macros/ChangeLog
@@ -1,3 +1,140 @@
+commit 08dd5d30c137abe43d5b1673edc39eb569881d66
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Thu Jun 23 08:03:13 2011 -0400
+
+ Version bump: 1.15.0
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit b87c5e7f6c9e856cf82c3c531255adccbd9fae5c
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Wed Jun 22 12:42:30 2011 -0400
+
+ XORG_WITH_XSLTPROC: warn at development time rather than config time
+
+ Catching up unimplemented features should be done earlier by the developer
+ during autoconf rather than during configure.
+
+ Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit f3332a7214af43878691b4f4876c39dc7d546266
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Wed Jun 22 10:02:28 2011 -0400
+
+ Add XORG_WITH_PERL macro
+
+ Following the same pattern as XMLTO and friends.
+ Allows all modules to use the same interface, variables
+ and options to check for perl.
+ Perl is used in libX11 and xserver.
+
+ Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit b927af52e8a3384126bfe709b725f6c5bad4ba34
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Wed Jun 22 09:04:32 2011 -0400
+
+ XORG_WITH_FOP: add minimum version checking support
+
+ Adding this feature is motivated by a bug in fop 0.95 where
+ fop crashes in the presence of some characters like the latin capital
+ sharp s. Fop version 1.0 works correctly.
+
+ This is the same feature found in XMLTO and the likes.
+ In the macro public interface there is a shift in parameter position
+ for the DEFAULT parameter. Doing development on older libraries
+ (point releases on older versions) will still work the same way as
+ the "no" value will be interpreted as the minimum version. It won't
+ be found, so fop will be disabled anyway.
+
+ Only libX11 has used XORG_WITH_FOP(no) and will be changed with a version
+ bump on util-macros.
+
+ Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 45c7d622657d295b2c02a46061765827ea37f00f
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Wed Jun 1 08:59:53 2011 -0400
+
+ XORG_PROG_RAWCPP: use AC_LANG_SOURCE to prevent warnings
+
+ The source for the AC_LANG_CONFTEST should be passed to AC_LANG_SOURCE
+ to satisfy the more stringent testing done by autoconf 2.68.
+ It is available in autoconf 2.60 where AC_LANG_DEFINES_PROVIDED is not.
+
+ Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 10a865fa671382dce50f7e49624ca5a730372d08
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri May 27 19:01:13 2011 -0700
+
+ Version bump: 1.14.0
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit e03a5cb9f313c6f5de3edc46327eb18b300b92c2
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat May 14 09:10:13 2011 -0700
+
+ Add AC_LANG_DEFINES_PROVIDED to XORG_RAW_CPP to silence autoconf warnings
+
+ Since we're intentionally doing a special case to just check cpp output,
+ and not a full program compilation, add the magic macro to silence:
+
+ configure.ac:46: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
+ ../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
+ aclocal.m4:1077: XORG_PROG_RAWCPP is expanded from...
+ configure.ac:46: the top level
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 61f5a48a74680c316bee2bf93d6ef5d50a688f22
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Mon May 2 16:52:26 2011 -0700
+
+ XORG_STRICT_OPTION: add -Werror=attributes to STRICT_CFLAGS for gcc
+
+ Flags unknown attributes as errors, if -Werror=attributes is supported.
+ (The -Werror=* option was first spotted in gcc 4.2.0 manuals.)
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 8a556afbe7ff81987597ca88e315fe66f10e4adc
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Mon Apr 25 20:31:33 2011 -0700
+
+ Make XORG_STRICT_OPTION always set STRICT_CFLAGS
+
+ Still only adds it to CWARNFLAGS if --enable-strict-compilation is
+ passed, but sets the variable with the right flags for the compiler
+ so it's available for other checks in configure scripts.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+ Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
+ Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit ef7824119ede1d491936ef1715296b47419f4c9c
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Mon Apr 25 20:26:48 2011 -0700
+
+ Create XORG_COMPILER_BRAND macro to centralize compiler checks
+
+ Check for gcc vs. intel vs. sun in one place, instead of
+ continuing to grow more places the check is replicated.
+
+ Add clang check here too, as it's now seeing a lot of use to build X.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+ Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
+ Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
+
commit 5bb0cddcc5359d764015299021718f42b0a4055c
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Mon Mar 14 20:12:36 2011 -0400
diff --git a/util/macros/Makefile.in b/util/macros/Makefile.in
index 67c868aa6..6d99c6659 100644
--- a/util/macros/Makefile.in
+++ b/util/macros/Makefile.in
@@ -44,9 +44,9 @@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
+install_sh_DATA = ${SHELL} $(install_sh) -c -m 644
+install_sh_PROGRAM = ${SHELL} $(install_sh) -c
+install_sh_SCRIPT = ${SHELL} $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
diff --git a/util/macros/configure b/util/macros/configure
index 5b4f4121e..0abcd8492 100644
--- a/util/macros/configure
+++ b/util/macros/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.62 for util-macros 1.13.0.
+# Generated by GNU Autoconf 2.62 for util-macros 1.15.0.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@@ -596,8 +596,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='util-macros'
PACKAGE_TARNAME='util-macros'
-PACKAGE_VERSION='1.13.0'
-PACKAGE_STRING='util-macros 1.13.0'
+PACKAGE_VERSION='1.15.0'
+PACKAGE_STRING='util-macros 1.15.0'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
ac_unique_file="Makefile.am"
@@ -1225,7 +1225,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 util-macros 1.13.0 to adapt to many kinds of systems.
+\`configure' configures util-macros 1.15.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1291,7 +1291,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of util-macros 1.13.0:";;
+ short | recursive ) echo "Configuration of util-macros 1.15.0:";;
esac
cat <<\_ACEOF
@@ -1365,7 +1365,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-util-macros configure 1.13.0
+util-macros configure 1.15.0
generated by GNU Autoconf 2.62
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1379,7 +1379,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 util-macros $as_me 1.13.0, which was
+It was created by util-macros $as_me 1.15.0, which was
generated by GNU Autoconf 2.62. Invocation command line was
$ $0 $@
@@ -2029,7 +2029,7 @@ fi
# Define the identity of the package.
PACKAGE='util-macros'
- VERSION='1.13.0'
+ VERSION='1.15.0'
cat >>confdefs.h <<_ACEOF
@@ -2812,7 +2812,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by util-macros $as_me 1.13.0, which was
+This file was extended by util-macros $as_me 1.15.0, which was
generated by GNU Autoconf 2.62. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -2855,7 +2855,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-util-macros config.status 1.13.0
+util-macros config.status 1.15.0
configured by $0, generated by GNU Autoconf 2.62,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/util/macros/configure.ac b/util/macros/configure.ac
index 630d54fb2..cfec46aa4 100644
--- a/util/macros/configure.ac
+++ b/util/macros/configure.ac
@@ -23,7 +23,7 @@ dnl Process this file with autoconf to create configure.
AC_PREREQ([2.60])
AC_INIT([util-macros],
- [1.13.0],
+ [1.15.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
[util-macros])
AC_CONFIG_SRCDIR([Makefile.am])
diff --git a/util/macros/xorg-macros.m4.in b/util/macros/xorg-macros.m4.in
index 76462b5c6..0527dfe23 100644
--- a/util/macros/xorg-macros.m4.in
+++ b/util/macros/xorg-macros.m4.in
@@ -64,7 +64,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
@@ -82,7 +82,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
@@ -457,6 +457,8 @@ AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
#
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],
@@ -487,13 +489,65 @@ else
AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
fi
-# Checking for minimum version is not implemented
-# but we want to keep the interface consistent with other commands
-m4_ifval([$1],[AC_MSG_WARN(Checking for MIN-VERSION is not implemented.)])
-
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])
# ----------------
@@ -740,10 +794,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
@@ -763,7 +818,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[)]),
@@ -792,6 +847,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
@@ -1290,6 +1361,23 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
]) # XORG_LINT_LIBRARY
+# XORG_COMPILER_BRAND
+# -------------------
+# Minimum version: 1.14.0
+#
+# Checks for various brands of compilers and sets flags as appropriate:
+# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
+# clang compiler - sets CLANGCC to "yes"
+# Intel compiler - sets INTELCC to "yes"
+# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
+#
+AC_DEFUN([XORG_COMPILER_BRAND], [
+AC_REQUIRE([AC_PROG_CC_C99])
+AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
+AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
+AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+]) # XORG_COMPILER_BRAND
+
# XORG_CWARNFLAGS
# ---------------
# Minimum version: 1.2.0
@@ -1298,6 +1386,7 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
#
AC_DEFUN([XORG_CWARNFLAGS], [
AC_REQUIRE([AC_PROG_CC_C99])
+AC_REQUIRE([XORG_COMPILER_BRAND])
if test "x$GCC" = xyes ; then
CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
@@ -1308,7 +1397,6 @@ if test "x$GCC" = xyes ; then
;;
esac
else
- AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
if test "x$SUNCC" = "xyes"; then
CWARNFLAGS="-v"
fi
@@ -1320,28 +1408,43 @@ AC_SUBST(CWARNFLAGS)
# -----------------------
# Minimum version: 1.3.0
#
-# Add configure option to enable strict compilation
+# Add configure option to enable strict compilation flags, such as treating
+# warnings as fatal errors.
+# If --enable-strict-compilation is passed to configure, adds strict flags to
+# $CWARNFLAGS.
+#
+# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
+# when strict compilation is unconditionally desired.
AC_DEFUN([XORG_STRICT_OPTION], [
# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
AC_REQUIRE([AC_PROG_CC_C99])
+AC_REQUIRE([XORG_COMPILER_BRAND])
AC_REQUIRE([XORG_CWARNFLAGS])
AC_ARG_ENABLE(strict-compilation,
AS_HELP_STRING([--enable-strict-compilation],
[Enable all warnings from compiler and make them errors (default: disabled)]),
[STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
+if test "x$GCC" = xyes ; then
+ STRICT_CFLAGS="-pedantic -Werror"
+ # Add -Werror=attributes if supported (gcc 4.2 & later)
+ AC_MSG_CHECKING([if $CC supports -Werror=attributes])
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $STRICT_CFLAGS -Werror=attributes"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([return 0;])],
+ [STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes"
+ AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])])
+ CFLAGS="$save_CFLAGS"
+elif test "x$SUNCC" = "xyes"; then
+ STRICT_CFLAGS="-errwarn"
+elif test "x$INTELCC" = "xyes"; then
+ STRICT_CFLAGS="-Werror"
+fi
if test "x$STRICT_COMPILE" = "xyes"; then
- AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
- AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
- if test "x$GCC" = xyes ; then
- STRICT_CFLAGS="-pedantic -Werror"
- elif test "x$SUNCC" = "xyes"; then
- STRICT_CFLAGS="-errwarn"
- elif test "x$INTELCC" = "xyes"; then
- STRICT_CFLAGS="-Werror"
- fi
+ CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
fi
-CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
+AC_SUBST([STRICT_CFLAGS])
AC_SUBST([CWARNFLAGS])
]) # XORG_STRICT_OPTION