From 59013f6ce33699a90981d3a8aea6a454ce5883af Mon Sep 17 00:00:00 2001 From: Robert Hooker Date: Tue, 15 Mar 2011 17:11:14 -0400 Subject: util-macros 1.13.0 --- debian/changelog | 6 ++ util-macros/ChangeLog | 63 ++++++++++++++ util-macros/configure | 20 ++--- util-macros/configure.ac | 2 +- util-macros/xorg-macros.m4.in | 188 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 268 insertions(+), 11 deletions(-) diff --git a/debian/changelog b/debian/changelog index ae02c0a..b150c7e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +xutils-dev (1:7.6+3) UNRELEASED; urgency=low + + * util-macros 1.13.0 + + -- Robert Hooker Tue, 15 Mar 2011 17:09:52 -0400 + xutils-dev (1:7.6+2) unstable; urgency=low * Drop xutils-dev build-dep (Closes: #616033). This introduces diff --git a/util-macros/ChangeLog b/util-macros/ChangeLog index f686ccf..54e9eaf 100644 --- a/util-macros/ChangeLog +++ b/util-macros/ChangeLog @@ -1,3 +1,66 @@ +commit 5bb0cddcc5359d764015299021718f42b0a4055c +Author: Gaetan Nadon +Date: Mon Mar 14 20:12:36 2011 -0400 + + Version bump: 1.13.0 + + Signed-off-by: Gaetan Nadon + +commit 700ecdc16426c14e649439138e8e40cdc41fe1c1 +Author: Gaetan Nadon +Date: Wed Mar 9 18:53:43 2011 -0500 + + XORG_LD_WRAP: check if linker supports -wrap + + Used mainly by test cases using a wrapper function. + + Signed-off-by: Gaetan Nadon + +commit 380074140f7b1e3f8ea006a4b1d928d23706b81d +Author: Gaetan Nadon +Date: Wed Mar 9 10:53:49 2011 -0500 + + XORG_WITH_GLIB: check for the GLib package + + 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 in conjunction with XORG_ENABLE_UNIT_TESTS, use both AM_CONDITIONAL + ENABLE_UNIT_TESTS and HAVE_GLIB. + Glib may be used for purpose other than testing + + Package builders should use --without-glib to ensure it does not get pulled in. + Unit tests may or may not use GLib. + + Developers should use --with-glib to error out if GLib is missing. + + 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 + + Reviewed-by: Dan Nicholson + Signed-off-by: Gaetan Nadon + +commit 78af2b882e01b17e38d1361a4a58b7768bb59bec +Author: Gaetan Nadon +Date: Wed Mar 9 07:10:18 2011 -0500 + + XORG_ENABLE_UNIT_TESTS: add support for unit testing + + 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 + + Reviewed-by: Dan Nicholson + Signed-off-by: Gaetan Nadon + commit 1218d7e6ed064e0c534a01caf013cff666cb44bf Author: Gaetan Nadon Date: Fri Feb 25 16:58:10 2011 -0500 diff --git a/util-macros/configure b/util-macros/configure index c103fb7..cd64b52 100755 --- 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.63 for util-macros 1.12.0. +# Generated by GNU Autoconf 2.63 for util-macros 1.13.0. # # Report bugs to . # @@ -596,8 +596,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='util-macros' PACKAGE_TARNAME='util-macros' -PACKAGE_VERSION='1.12.0' -PACKAGE_STRING='util-macros 1.12.0' +PACKAGE_VERSION='1.13.0' +PACKAGE_STRING='util-macros 1.13.0' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' ac_unique_file="Makefile.am" @@ -1227,7 +1227,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.12.0 to adapt to many kinds of systems. +\`configure' configures util-macros 1.13.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1293,7 +1293,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of util-macros 1.12.0:";; + short | recursive ) echo "Configuration of util-macros 1.13.0:";; esac cat <<\_ACEOF @@ -1367,7 +1367,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -util-macros configure 1.12.0 +util-macros configure 1.13.0 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1381,7 +1381,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.12.0, which was +It was created by util-macros $as_me 1.13.0, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -2098,7 +2098,7 @@ fi # Define the identity of the package. PACKAGE='util-macros' - VERSION='1.12.0' + VERSION='1.13.0' cat >>confdefs.h <<_ACEOF @@ -2875,7 +2875,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.12.0, which was +This file was extended by util-macros $as_me 1.13.0, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -2925,7 +2925,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -util-macros config.status 1.12.0 +util-macros config.status 1.13.0 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/util-macros/configure.ac b/util-macros/configure.ac index c83b8b2..630d54f 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.12.0], + [1.13.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 44038e1..76462b5 100644 --- a/util-macros/xorg-macros.m4.in +++ b/util-macros/xorg-macros.m4.in @@ -951,6 +951,194 @@ AC_MSG_CHECKING([whether to build functional specifications]) AC_MSG_RESULT([$build_specs]) ]) # XORG_ENABLE_SPECS +# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) +# ---------------------------------------------- +# Minimum version: 1.13.0 +# +# This macro enables a builder to enable/disable unit testing +# It makes no assumption about the test cases implementation +# Test cases may or may not use Automake "Support for test suites" +# They may or may not use the software utility library GLib +# +# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL +# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. +# The variable enable_unit_tests is used by other macros in this file. +# +# Interface to module: +# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests +# enable_unit_tests: used in configure.ac for additional configuration +# --enable-unit-tests: 'yes' user instructs the module to build tests +# 'no' user instructs the module not to build tests +# parm1: specify the default value, yes or no. +# +AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ +AC_BEFORE([$0], [XORG_WITH_GLIB]) +AC_BEFORE([$0], [XORG_LD_WRAP]) +m4_define([_defopt], m4_default([$1], [auto])) +AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], + [Enable building unit test cases (default: ]_defopt[)]), + [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) +m4_undefine([_defopt]) +AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) +AC_MSG_CHECKING([whether to build unit test cases]) +AC_MSG_RESULT([$enable_unit_tests]) +]) # XORG_ENABLE_UNIT_TESTS + +# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) +# ---------------------------------------- +# Minimum version: 1.13.0 +# +# GLib is a library which provides advanced data structures and functions. +# This macro enables a module to test for the presence of Glib. +# +# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. +# Otherwise the value of $enable_unit_tests is blank. +# +# Interface to module: +# HAVE_GLIB: used in makefiles to conditionally build targets +# with_glib: used in configure.ac to know if GLib has been found +# --with-glib: 'yes' user instructs the module to use glib +# 'no' user instructs the module not to use glib +# +AC_DEFUN([XORG_WITH_GLIB],[ +AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +m4_define([_defopt], m4_default([$2], [auto])) +AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], + [Use GLib library for unit testing (default: ]_defopt[)]), + [with_glib=$withval], [with_glib=]_defopt) +m4_undefine([_defopt]) + +have_glib=no +# Do not probe GLib if user explicitly disabled unit testing +if test "x$enable_unit_tests" != x"no"; then + # Do not probe GLib if user explicitly disabled it + if test "x$with_glib" != x"no"; then + m4_ifval( + [$1], + [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], + [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] + ) + fi +fi + +# Not having GLib when unit testing has been explicitly requested is an error +if test "x$enable_unit_tests" = x"yes"; then + if test "x$have_glib" = x"no"; then + AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) + fi +fi + +# Having unit testing disabled when GLib has been explicitly requested is an error +if test "x$enable_unit_tests" = x"no"; then + if test "x$with_glib" = x"yes"; then + AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) + fi +fi + +# Not having GLib when it has been explicitly requested is an error +if test "x$with_glib" = x"yes"; then + if test "x$have_glib" = x"no"; then + AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) + fi +fi + +AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) +]) # XORG_WITH_GLIB + +# XORG_LD_WRAP +# ------------ +# Minimum version: 1.13.0 +# +# Check if linker supports -wrap, passed via compiler flags +# +# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. +# Otherwise the value of $enable_unit_tests is blank. +# +AC_DEFUN([XORG_LD_WRAP],[ +XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no]) +# Not having ld wrap when unit testing has been explicitly requested is an error +if test "x$enable_unit_tests" = x"yes"; then + if test "x$have_ld_wrap" = x"no"; then + AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) + fi +fi +AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) +# +]) # XORG_LD_WRAP + +# XORG_CHECK_LINKER_FLAGS +# ----------------------- +# SYNOPSIS +# +# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE]) +# +# DESCRIPTION +# +# Check whether the given linker FLAGS work with the current language's +# linker, or whether they give an error. +# +# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on +# success/failure. +# +# NOTE: Based on AX_CHECK_COMPILER_FLAGS. +# +# LICENSE +# +# Copyright (c) 2009 Mike Frysinger +# Copyright (c) 2009 Steven G. Johnson +# 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 . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well.# +AC_DEFUN([XORG_CHECK_LINKER_FLAGS], +[AC_MSG_CHECKING([whether the linker accepts $1]) +dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: +AS_LITERAL_IF([$1], + [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ + ax_save_FLAGS=$LDFLAGS + LDFLAGS="$1" + AC_LINK_IFELSE([AC_LANG_PROGRAM()], + AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, + AS_TR_SH(xorg_cv_linker_flags_[$1])=no) + LDFLAGS=$ax_save_FLAGS])], + [ax_save_FLAGS=$LDFLAGS + LDFLAGS="$1" + AC_LINK_IFELSE([AC_LANG_PROGRAM()], + eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, + eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) + LDFLAGS=$ax_save_FLAGS]) +eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) +AC_MSG_RESULT($xorg_check_linker_flags) +if test "x$xorg_check_linker_flags" = xyes; then + m4_default([$2], :) +else + m4_default([$3], :) +fi +]) # XORG_CHECK_LINKER_FLAGS + # XORG_CHECK_MALLOC_ZERO # ---------------------- # Minimum version: 1.0.0 -- cgit v1.2.3