~ubuntu-branches/ubuntu/trusty/xinput/trusty

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Package Import Robot
  • Author(s): Cyril Brulebois, Julien Cristau, Chase Douglas, Cyril Brulebois
  • Date: 2012-05-20 13:56:03 UTC
  • mfrom: (1.1.9) (4.1.6 sid)
  • Revision ID: package-import@ubuntu.com-20120520135603-kz0mjqk7s0p84mz0
Tags: 1.6.0-1
[ Julien Cristau ]
* Change Maintainer to the X Strike Force.
* Add Vcs-* control fields.

[ Chase Douglas ]
* Bump Standards-Version to 3.9.2
* Add build deps on libxrandr-dev and libxinerama-dev
* Bump build deps on libxi and x11proto-input-dev

[ Cyril Brulebois ]
* New upstream release.
* Replace Julien with myself in Uploaders.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
 
1
# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
2
2
 
3
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
 
# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 
4
# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
 
5
# Inc.
5
6
# This file is free software; the Free Software Foundation
6
7
# gives unlimited permission to copy and/or distribute it,
7
8
# with or without modifications, as long as this notice is preserved.
216
217
# See the "minimum version" comment for each macro you use to see what 
217
218
# version you require.
218
219
m4_defun([XORG_MACROS_VERSION],[
219
 
m4_define([vers_have], [1.15.0])
 
220
m4_define([vers_have], [1.16.1])
220
221
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
221
222
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
222
223
m4_if(m4_cmp(maj_have, maj_needed), 0,,
1224
1225
AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
1225
1226
AC_BEFORE([$0], [XORG_WITH_GLIB])
1226
1227
AC_BEFORE([$0], [XORG_LD_WRAP])
 
1228
AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
1227
1229
m4_define([_defopt], m4_default([$1], [auto]))
1228
1230
AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
1229
1231
        [Enable building unit test cases (default: ]_defopt[)]),
1295
1297
AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
1296
1298
]) # XORG_WITH_GLIB
1297
1299
 
1298
 
# XORG_LD_WRAP
1299
 
# ------------
 
1300
# XORG_LD_WRAP([required|optional])
 
1301
# ---------------------------------
1300
1302
# Minimum version: 1.13.0
1301
1303
#
1302
1304
# Check if linker supports -wrap, passed via compiler flags
1304
1306
# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
1305
1307
# Otherwise the value of $enable_unit_tests is blank.
1306
1308
#
 
1309
# Argument added in 1.16.0 - default is "required", to match existing behavior
 
1310
# of returning an error if enable_unit_tests is yes, and ld -wrap is not
 
1311
# available, an argument of "optional" allows use when some unit tests require
 
1312
# ld -wrap and others do not.
 
1313
#
1307
1314
AC_DEFUN([XORG_LD_WRAP],[
1308
 
XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no])
 
1315
XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
 
1316
    [AC_LANG_PROGRAM([#include <stdlib.h>
 
1317
                      void __wrap_exit(int status) { return; }],
 
1318
                     [exit(0);])])
1309
1319
# Not having ld wrap when unit testing has been explicitly requested is an error
1310
 
if test "x$enable_unit_tests" = x"yes"; then
 
1320
if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
1311
1321
  if test "x$have_ld_wrap" = x"no"; then
1312
1322
    AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
1313
1323
  fi
1320
1330
# -----------------------
1321
1331
# SYNOPSIS
1322
1332
#
1323
 
#   XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE])
 
1333
#   XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
1324
1334
#
1325
1335
# DESCRIPTION
1326
1336
#
1330
1340
#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
1331
1341
#   success/failure.
1332
1342
#
 
1343
#   PROGRAM-SOURCE is the program source to link with, if needed
 
1344
#
1333
1345
#   NOTE: Based on AX_CHECK_COMPILER_FLAGS.
1334
1346
#
1335
1347
# LICENSE
1370
1382
  [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
1371
1383
      ax_save_FLAGS=$LDFLAGS
1372
1384
      LDFLAGS="$1"
1373
 
      AC_LINK_IFELSE([AC_LANG_PROGRAM()],
 
1385
      AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])],
1374
1386
        AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
1375
1387
        AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
1376
1388
      LDFLAGS=$ax_save_FLAGS])],
1389
1401
fi
1390
1402
]) # XORG_CHECK_LINKER_FLAGS
1391
1403
 
 
1404
# XORG_MEMORY_CHECK_FLAGS
 
1405
# -----------------------
 
1406
# Minimum version: 1.16.0
 
1407
#
 
1408
# This macro attempts to find appropriate memory checking functionality
 
1409
# for various platforms which unit testing code may use to catch various
 
1410
# forms of memory allocation and access errors in testing.
 
1411
#
 
1412
# Interface to module:
 
1413
# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
 
1414
#                         Usually added to TESTS_ENVIRONMENT in Makefile.am
 
1415
#
 
1416
# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim.
 
1417
#
 
1418
AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[
 
1419
 
 
1420
AC_REQUIRE([AC_CANONICAL_HOST])
 
1421
AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV],
 
1422
           [Environment variables to enable memory checking in tests])
 
1423
 
 
1424
# Check for different types of support on different platforms
 
1425
case $host_os in
 
1426
    solaris*)
 
1427
        AC_CHECK_LIB([umem], [umem_alloc],
 
1428
            [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'])
 
1429
        ;;
 
1430
    *-gnu*) # GNU libc - Value is used as a single byte bit pattern,
 
1431
        # both directly and inverted, so should not be 0 or 255.
 
1432
        malloc_debug_env='MALLOC_PERTURB_=15'
 
1433
        ;;
 
1434
    darwin*)
 
1435
        malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
 
1436
        ;;
 
1437
    *bsd*)
 
1438
        malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
 
1439
        ;;
 
1440
esac
 
1441
 
 
1442
# User supplied flags override default flags
 
1443
if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
 
1444
    malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
 
1445
fi
 
1446
 
 
1447
AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
 
1448
]) # XORG_WITH_LINT
 
1449
 
1392
1450
# XORG_CHECK_MALLOC_ZERO
1393
1451
# ----------------------
1394
1452
# Minimum version: 1.0.0
1557
1615
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
1558
1616
]) # XORG_COMPILER_BRAND
1559
1617
 
 
1618
# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
 
1619
# ---------------
 
1620
# Minimum version: 1.16.0
 
1621
#
 
1622
# Test if the compiler works when passed the given flag as a command line argument.
 
1623
# If it succeeds, the flag is appeneded to the given variable.  If not, it tries the
 
1624
# next flag in the list until there are no more options.
 
1625
#
 
1626
# Note that this does not guarantee that the compiler supports the flag as some
 
1627
# compilers will simply ignore arguments that they do not understand, but we do
 
1628
# attempt to weed out false positives by using -Werror=unknown-warning-option and
 
1629
# -Werror=unused-command-line-argument
 
1630
#
 
1631
AC_DEFUN([XORG_TESTSET_CFLAG], [
 
1632
AC_REQUIRE([AC_PROG_CC_C99])
 
1633
m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
 
1634
m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
 
1635
 
 
1636
xorg_testset_save_CFLAGS="$CFLAGS"
 
1637
 
 
1638
if test "x$xorg_testset_unknown_warning_option" = "x" ; then
 
1639
        CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 
1640
        AC_MSG_CHECKING([if $CC supports -Werror=unknown-warning-option])
 
1641
        AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
 
1642
                          [xorg_testset_unknown_warning_option=yes],
 
1643
                          [xorg_testset_unknown_warning_option=no])
 
1644
        AC_MSG_RESULT([$xorg_testset_unknown_warning_option])
 
1645
        CFLAGS="$xorg_testset_save_CFLAGS"
 
1646
fi
 
1647
 
 
1648
if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
 
1649
        if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
 
1650
                CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 
1651
        fi
 
1652
        CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 
1653
        AC_MSG_CHECKING([if $CC supports -Werror=unused-command-line-argument])
 
1654
        AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
 
1655
                          [xorg_testset_unused_command_line_argument=yes],
 
1656
                          [xorg_testset_unused_command_line_argument=no])
 
1657
        AC_MSG_RESULT([$xorg_testset_unused_command_line_argument])
 
1658
        CFLAGS="$xorg_testset_save_CFLAGS"
 
1659
fi
 
1660
 
 
1661
found="no"
 
1662
m4_foreach([flag], m4_cdr($@), [
 
1663
        if test $found = "no" ; then
 
1664
                if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
 
1665
                        CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 
1666
                fi
 
1667
 
 
1668
                if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
 
1669
                        CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
 
1670
                fi
 
1671
 
 
1672
                CFLAGS="$CFLAGS ]flag["
 
1673
 
 
1674
                AC_MSG_CHECKING([if $CC supports ]flag[])
 
1675
                AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
 
1676
                                  [supported=yes], [supported=no])
 
1677
                AC_MSG_RESULT([$supported])
 
1678
                CFLAGS="$xorg_testset_save_CFLAGS"
 
1679
 
 
1680
                if test "$supported" = "yes" ; then
 
1681
                        $1="$$1 ]flag["
 
1682
                        found="yes"
 
1683
                fi
 
1684
        fi
 
1685
])
 
1686
]) # XORG_TESTSET_CFLAG
 
1687
 
 
1688
# XORG_COMPILER_FLAGS
 
1689
# ---------------
 
1690
# Minimum version: 1.16.0
 
1691
#
 
1692
# Defines BASE_CFLAGS to contain a set of command line arguments supported
 
1693
# by the selected compiler which do NOT alter the generated code.  These
 
1694
# arguments will cause the compiler to print various warnings during
 
1695
# compilation AND turn a conservative set of warnings into errors.
 
1696
#
 
1697
# The set of flags supported by BASE_CFLAGS will grow in future
 
1698
# versions of util-macros as options are added to new compilers.
 
1699
#
 
1700
AC_DEFUN([XORG_COMPILER_FLAGS], [
 
1701
AC_REQUIRE([XORG_COMPILER_BRAND])
 
1702
 
 
1703
AC_ARG_ENABLE(selective-werror,
 
1704
              AS_HELP_STRING([--disable-selective-werror],
 
1705
                             [Turn off selective compiler errors. (default: enabled)]),
 
1706
              [SELECTIVE_WERROR=$enableval],
 
1707
              [SELECTIVE_WERROR=yes])
 
1708
 
 
1709
# -v is too short to test reliably with XORG_TESTSET_CFLAG
 
1710
if test "x$SUNCC" = "xyes"; then
 
1711
    BASE_CFLAGS="-v"
 
1712
else
 
1713
    BASE_CFLAGS=""
 
1714
fi
 
1715
 
 
1716
# This chunk of warnings were those that existed in the legacy CWARNFLAGS
 
1717
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wall])
 
1718
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wpointer-arith])
 
1719
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wstrict-prototypes])
 
1720
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-prototypes])
 
1721
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-declarations])
 
1722
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wnested-externs])
 
1723
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wbad-function-cast])
 
1724
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wformat=2], [-Wformat])
 
1725
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wold-style-definition])
 
1726
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wdeclaration-after-statement])
 
1727
 
 
1728
# This chunk adds additional warnings that could catch undesired effects.
 
1729
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wunused])
 
1730
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wuninitialized])
 
1731
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wshadow])
 
1732
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wcast-qual])
 
1733
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-noreturn])
 
1734
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-format-attribute])
 
1735
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wredundant-decls])
 
1736
 
 
1737
# These are currently disabled because they are noisy.  They will be enabled
 
1738
# in the future once the codebase is sufficiently modernized to silence
 
1739
# them.  For now, I don't want them to drown out the other warnings.
 
1740
# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wlogical-op])
 
1741
# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wparentheses])
 
1742
# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wcast-align])
 
1743
 
 
1744
# Turn some warnings into errors, so we don't accidently get successful builds
 
1745
# when there are problems that should be fixed.
 
1746
 
 
1747
if test "x$SELECTIVE_WERROR" = "xyes" ; then
 
1748
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
 
1749
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=nonnull])
 
1750
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=init-self])
 
1751
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=main])
 
1752
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=missing-braces])
 
1753
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=sequence-point])
 
1754
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
 
1755
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=trigraphs])
 
1756
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=array-bounds])
 
1757
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=write-strings])
 
1758
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=address])
 
1759
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
 
1760
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
 
1761
else
 
1762
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])
 
1763
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wimplicit])
 
1764
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wnonnull])
 
1765
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Winit-self])
 
1766
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmain])
 
1767
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-braces])
 
1768
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wsequence-point])
 
1769
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wreturn-type])
 
1770
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wtrigraphs])
 
1771
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Warray-bounds])
 
1772
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wwrite-strings])
 
1773
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Waddress])
 
1774
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wint-to-pointer-cast])
 
1775
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wpointer-to-int-cast])
 
1776
fi
 
1777
 
 
1778
AC_SUBST([BASE_CFLAGS])
 
1779
]) # XORG_COMPILER_FLAGS
 
1780
 
1560
1781
# XORG_CWARNFLAGS
1561
1782
# ---------------
1562
1783
# Minimum version: 1.2.0
 
1784
# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
1563
1785
#
1564
1786
# Defines CWARNFLAGS to enable C compiler warnings.
1565
1787
#
 
1788
# This function is deprecated because it defines -fno-strict-aliasing
 
1789
# which alters the code generated by the compiler.  If -fno-strict-aliasing
 
1790
# is needed, then it should be added explicitly in the module when
 
1791
# it is updated to use BASE_CFLAGS.
 
1792
#
1566
1793
AC_DEFUN([XORG_CWARNFLAGS], [
1567
 
AC_REQUIRE([AC_PROG_CC_C99])
 
1794
AC_REQUIRE([XORG_COMPILER_FLAGS])
1568
1795
AC_REQUIRE([XORG_COMPILER_BRAND])
 
1796
CWARNFLAGS="$BASE_CFLAGS"
1569
1797
if  test "x$GCC" = xyes ; then
1570
 
    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
1571
 
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
1572
 
-Wbad-function-cast -Wformat=2"
1573
 
    case `$CC -dumpversion` in
1574
 
    3.4.* | 4.*)
1575
 
        CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
1576
 
        ;;
1577
 
    esac
1578
 
else
1579
 
    if test "x$SUNCC" = "xyes"; then
1580
 
        CWARNFLAGS="-v"
1581
 
    fi
 
1798
    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
1582
1799
fi
1583
1800
AC_SUBST(CWARNFLAGS)
1584
1801
]) # XORG_CWARNFLAGS
1590
1807
# Add configure option to enable strict compilation flags, such as treating
1591
1808
# warnings as fatal errors.
1592
1809
# If --enable-strict-compilation is passed to configure, adds strict flags to
1593
 
# $CWARNFLAGS.
 
1810
# $BASE_CFLAGS and the deprecated $CWARNFLAGS.
1594
1811
#
1595
1812
# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
1596
1813
# when strict compilation is unconditionally desired.
1597
1814
AC_DEFUN([XORG_STRICT_OPTION], [
1598
 
# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
1599
 
AC_REQUIRE([AC_PROG_CC_C99])
1600
 
AC_REQUIRE([XORG_COMPILER_BRAND])
1601
1815
AC_REQUIRE([XORG_CWARNFLAGS])
 
1816
AC_REQUIRE([XORG_COMPILER_FLAGS])
1602
1817
 
1603
1818
AC_ARG_ENABLE(strict-compilation,
1604
1819
                          AS_HELP_STRING([--enable-strict-compilation],
1605
1820
                          [Enable all warnings from compiler and make them errors (default: disabled)]),
1606
1821
                          [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
1607
 
if test "x$GCC" = xyes ; then
1608
 
    STRICT_CFLAGS="-pedantic -Werror"
1609
 
    # Add -Werror=attributes if supported (gcc 4.2 & later)
1610
 
    AC_MSG_CHECKING([if $CC supports -Werror=attributes])
1611
 
    save_CFLAGS="$CFLAGS"
1612
 
    CFLAGS="$CFLAGS $STRICT_CFLAGS -Werror=attributes"
1613
 
    AC_COMPILE_IFELSE([AC_LANG_SOURCE([return 0;])],
1614
 
                      [STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes"
1615
 
                       AC_MSG_RESULT([yes])],
1616
 
                      [AC_MSG_RESULT([no])])
1617
 
    CFLAGS="$save_CFLAGS"
1618
 
elif test "x$SUNCC" = "xyes"; then
1619
 
    STRICT_CFLAGS="-errwarn"
1620
 
elif test "x$INTELCC" = "xyes"; then
1621
 
    STRICT_CFLAGS="-Werror"
1622
 
fi
 
1822
 
 
1823
STRICT_CFLAGS=""
 
1824
XORG_TESTSET_CFLAG([STRICT_CFLAGS], [-pedantic])
 
1825
XORG_TESTSET_CFLAG([STRICT_CFLAGS], [-Werror], [-errwarn])
 
1826
 
 
1827
# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
 
1828
# activate it with -Werror, so we add it here explicitly.
 
1829
XORG_TESTSET_CFLAG([STRICT_CFLAGS], [-Werror=attributes])
 
1830
 
1623
1831
if test "x$STRICT_COMPILE" = "xyes"; then
 
1832
    BASE_CFLAGS="$BASE_CFLAGS $STRICT_CFLAGS"
1624
1833
    CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
1625
1834
fi
1626
1835
AC_SUBST([STRICT_CFLAGS])
 
1836
AC_SUBST([BASE_CFLAGS])
1627
1837
AC_SUBST([CWARNFLAGS])
1628
1838
]) # XORG_STRICT_OPTION
1629
1839
 
1635
1845
#
1636
1846
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
1637
1847
AC_REQUIRE([AC_PROG_INSTALL])
 
1848
XORG_COMPILER_FLAGS
1638
1849
XORG_CWARNFLAGS
1639
1850
XORG_STRICT_OPTION
1640
1851
XORG_RELEASE_VERSION
1726
1937
AC_SUBST([CHANGELOG_CMD])
1727
1938
]) # XORG_CHANGELOG
1728
1939
 
1729
 
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 
1940
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
 
1941
# Foundation, Inc.
1730
1942
#
1731
1943
# This file is free software; the Free Software Foundation
1732
1944
# gives unlimited permission to copy and/or distribute it,
1733
1945
# with or without modifications, as long as this notice is preserved.
1734
1946
 
 
1947
# serial 1
 
1948
 
1735
1949
# AM_AUTOMAKE_VERSION(VERSION)
1736
1950
# ----------------------------
1737
1951
# Automake X.Y traces this macro to ensure aclocal.m4 has been
1741
1955
[am__api_version='1.11'
1742
1956
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
1743
1957
dnl require some minimum version.  Point them to the right macro.
1744
 
m4_if([$1], [1.11.1], [],
 
1958
m4_if([$1], [1.11.3], [],
1745
1959
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
1746
1960
])
1747
1961
 
1757
1971
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
1758
1972
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
1759
1973
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1760
 
[AM_AUTOMAKE_VERSION([1.11.1])dnl
 
1974
[AM_AUTOMAKE_VERSION([1.11.3])dnl
1761
1975
m4_ifndef([AC_AUTOCONF_VERSION],
1762
1976
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1763
1977
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
1764
1978
 
1765
1979
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
1766
1980
 
1767
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
1981
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
1768
1982
#
1769
1983
# This file is free software; the Free Software Foundation
1770
1984
# gives unlimited permission to copy and/or distribute it,
1771
1985
# with or without modifications, as long as this notice is preserved.
1772
1986
 
 
1987
# serial 1
 
1988
 
1773
1989
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1774
1990
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
1775
1991
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
1851
2067
Usually this means the macro was only invoked conditionally.]])
1852
2068
fi])])
1853
2069
 
1854
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
1855
 
# Free Software Foundation, Inc.
 
2070
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
 
2071
# 2010, 2011 Free Software Foundation, Inc.
1856
2072
#
1857
2073
# This file is free software; the Free Software Foundation
1858
2074
# gives unlimited permission to copy and/or distribute it,
1859
2075
# with or without modifications, as long as this notice is preserved.
1860
2076
 
1861
 
# serial 10
 
2077
# serial 12
1862
2078
 
1863
2079
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
1864
2080
# written in clear, in which case automake, when reading aclocal.m4,
1898
2114
  # instance it was reported that on HP-UX the gcc test will end up
1899
2115
  # making a dummy file named `D' -- because `-MD' means `put the output
1900
2116
  # in D'.
 
2117
  rm -rf conftest.dir
1901
2118
  mkdir conftest.dir
1902
2119
  # Copy depcomp to subdir because otherwise we won't find it if we're
1903
2120
  # using a relative directory.
1962
2179
        break
1963
2180
      fi
1964
2181
      ;;
1965
 
    msvisualcpp | msvcmsys)
 
2182
    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
1966
2183
      # This compiler won't grok `-c -o', but also, the minuso test has
1967
2184
      # not run yet.  These depmodes are late enough in the game, and
1968
2185
      # so weak that their functioning should not be impacted.
2027
2244
if test "x$enable_dependency_tracking" != xno; then
2028
2245
  am_depcomp="$ac_aux_dir/depcomp"
2029
2246
  AMDEPBACKSLASH='\'
 
2247
  am__nodep='_no'
2030
2248
fi
2031
2249
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
2032
2250
AC_SUBST([AMDEPBACKSLASH])dnl
2033
2251
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 
2252
AC_SUBST([am__nodep])dnl
 
2253
_AM_SUBST_NOTMAKE([am__nodep])dnl
2034
2254
])
2035
2255
 
2036
2256
# Generate code to set up dependency tracking.              -*- Autoconf -*-
2252
2472
done
2253
2473
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
2254
2474
 
2255
 
# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
 
2475
# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
 
2476
# Inc.
2256
2477
#
2257
2478
# This file is free software; the Free Software Foundation
2258
2479
# gives unlimited permission to copy and/or distribute it,
2259
2480
# with or without modifications, as long as this notice is preserved.
2260
2481
 
 
2482
# serial 1
 
2483
 
2261
2484
# AM_PROG_INSTALL_SH
2262
2485
# ------------------
2263
2486
# Define $install_sh.
2297
2520
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
2298
2521
# From Jim Meyering
2299
2522
 
2300
 
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
2301
 
# Free Software Foundation, Inc.
 
2523
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
 
2524
# 2011 Free Software Foundation, Inc.
2302
2525
#
2303
2526
# This file is free software; the Free Software Foundation
2304
2527
# gives unlimited permission to copy and/or distribute it,
2318
2541
       [disable], [m4_define([am_maintainer_other], [enable])],
2319
2542
       [m4_define([am_maintainer_other], [enable])
2320
2543
        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
2321
 
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
 
2544
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
2322
2545
  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
2323
2546
  AC_ARG_ENABLE([maintainer-mode],
2324
2547
[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
2429
2652
fi
2430
2653
])
2431
2654
 
2432
 
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 
2655
# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
 
2656
# Inc.
2433
2657
#
2434
2658
# This file is free software; the Free Software Foundation
2435
2659
# gives unlimited permission to copy and/or distribute it,
2436
2660
# with or without modifications, as long as this notice is preserved.
2437
2661
 
 
2662
# serial 1
 
2663
 
2438
2664
# AM_PROG_MKDIR_P
2439
2665
# ---------------
2440
2666
# Check for `mkdir -p'.
2457
2683
 
2458
2684
# Helper functions for option handling.                     -*- Autoconf -*-
2459
2685
 
2460
 
# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
 
2686
# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
 
2687
# Foundation, Inc.
2461
2688
#
2462
2689
# This file is free software; the Free Software Foundation
2463
2690
# gives unlimited permission to copy and/or distribute it,
2464
2691
# with or without modifications, as long as this notice is preserved.
2465
2692
 
2466
 
# serial 4
 
2693
# serial 5
2467
2694
 
2468
2695
# _AM_MANGLE_OPTION(NAME)
2469
2696
# -----------------------
2471
2698
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
2472
2699
 
2473
2700
# _AM_SET_OPTION(NAME)
2474
 
# ------------------------------
 
2701
# --------------------
2475
2702
# Set option NAME.  Presently that only means defining a flag for this option.
2476
2703
AC_DEFUN([_AM_SET_OPTION],
2477
2704
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
2478
2705
 
2479
2706
# _AM_SET_OPTIONS(OPTIONS)
2480
 
# ----------------------------------
 
2707
# ------------------------
2481
2708
# OPTIONS is a space-separated list of Automake options.
2482
2709
AC_DEFUN([_AM_SET_OPTIONS],
2483
2710
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2553
2780
fi
2554
2781
AC_MSG_RESULT(yes)])
2555
2782
 
2556
 
# Copyright (C) 2009  Free Software Foundation, Inc.
 
2783
# Copyright (C) 2009, 2011  Free Software Foundation, Inc.
2557
2784
#
2558
2785
# This file is free software; the Free Software Foundation
2559
2786
# gives unlimited permission to copy and/or distribute it,
2560
2787
# with or without modifications, as long as this notice is preserved.
2561
2788
 
2562
 
# serial 1
 
2789
# serial 2
2563
2790
 
2564
2791
# AM_SILENT_RULES([DEFAULT])
2565
2792
# --------------------------
2574
2801
no)  AM_DEFAULT_VERBOSITY=1;;
2575
2802
*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
2576
2803
esac
 
2804
dnl
 
2805
dnl A few `make' implementations (e.g., NonStop OS and NextStep)
 
2806
dnl do not support nested variable expansions.
 
2807
dnl See automake bug#9928 and bug#10237.
 
2808
am_make=${MAKE-make}
 
2809
AC_CACHE_CHECK([whether $am_make supports nested variables],
 
2810
   [am_cv_make_support_nested_variables],
 
2811
   [if AS_ECHO([['TRUE=$(BAR$(V))
 
2812
BAR0=false
 
2813
BAR1=true
 
2814
V=1
 
2815
am__doit:
 
2816
        @$(TRUE)
 
2817
.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
 
2818
  am_cv_make_support_nested_variables=yes
 
2819
else
 
2820
  am_cv_make_support_nested_variables=no
 
2821
fi])
 
2822
if test $am_cv_make_support_nested_variables = yes; then
 
2823
  dnl Using `$V' instead of `$(V)' breaks IRIX make.
 
2824
  AM_V='$(V)'
 
2825
  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
 
2826
else
 
2827
  AM_V=$AM_DEFAULT_VERBOSITY
 
2828
  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
 
2829
fi
 
2830
AC_SUBST([AM_V])dnl
 
2831
AM_SUBST_NOTMAKE([AM_V])dnl
 
2832
AC_SUBST([AM_DEFAULT_V])dnl
 
2833
AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
2577
2834
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
2578
2835
AM_BACKSLASH='\'
2579
2836
AC_SUBST([AM_BACKSLASH])dnl
2580
2837
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
2581
2838
])
2582
2839
 
2583
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
2840
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
2584
2841
#
2585
2842
# This file is free software; the Free Software Foundation
2586
2843
# gives unlimited permission to copy and/or distribute it,
2587
2844
# with or without modifications, as long as this notice is preserved.
2588
2845
 
 
2846
# serial 1
 
2847
 
2589
2848
# AM_PROG_INSTALL_STRIP
2590
2849
# ---------------------
2591
2850
# One issue with vendor `install' (even GNU) is that you can't
2608
2867
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2609
2868
AC_SUBST([INSTALL_STRIP_PROGRAM])])
2610
2869
 
2611
 
# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
 
2870
# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
2612
2871
#
2613
2872
# This file is free software; the Free Software Foundation
2614
2873
# gives unlimited permission to copy and/or distribute it,
2615
2874
# with or without modifications, as long as this notice is preserved.
2616
2875
 
2617
 
# serial 2
 
2876
# serial 3
2618
2877
 
2619
2878
# _AM_SUBST_NOTMAKE(VARIABLE)
2620
2879
# ---------------------------
2623
2882
AC_DEFUN([_AM_SUBST_NOTMAKE])
2624
2883
 
2625
2884
# AM_SUBST_NOTMAKE(VARIABLE)
2626
 
# ---------------------------
 
2885
# --------------------------
2627
2886
# Public sister of _AM_SUBST_NOTMAKE.
2628
2887
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
2629
2888
 
2630
2889
# Check how to create a tarball.                            -*- Autoconf -*-
2631
2890
 
2632
 
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
2891
# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
2633
2892
#
2634
2893
# This file is free software; the Free Software Foundation
2635
2894
# gives unlimited permission to copy and/or distribute it,
2651
2910
# a tarball read from stdin.
2652
2911
#     $(am__untar) < result.tar
2653
2912
AC_DEFUN([_AM_PROG_TAR],
2654
 
[# Always define AMTAR for backward compatibility.
2655
 
AM_MISSING_PROG([AMTAR], [tar])
 
2913
[# Always define AMTAR for backward compatibility.  Yes, it's still used
 
2914
# in the wild :-(  We should find a proper way to deprecate it ...
 
2915
AC_SUBST([AMTAR], ['$${TAR-tar}'])
2656
2916
m4_if([$1], [v7],
2657
 
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
 
2917
     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
2658
2918
     [m4_case([$1], [ustar],, [pax],,
2659
2919
              [m4_fatal([Unknown tar format])])
2660
2920
AC_MSG_CHECKING([how to create a $1 tar archive])