~ubuntu-branches/debian/sid/x11-apps/sid

« back to all changes in this revision

Viewing changes to xclipboard/aclocal.m4

  • Committer: Package Import Robot
  • Author(s): Julien Cristau
  • Date: 2013-12-25 18:39:25 UTC
  • Revision ID: package-import@ubuntu.com-20131225183925-kh1rc0smebkuyxf7
Tags: 7.7+2
* xclipboard 1.1.3
* xclock 1.0.7
* xman 1.1.3
* Use dh.
* Disable silent build rules.
* Remove Cyril from Uploaders.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
 
 
3
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
 
# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 
1
# generated automatically by aclocal 1.14 -*- Autoconf -*-
 
2
 
 
3
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 
4
 
5
5
# This file is free software; the Free Software Foundation
6
6
# gives unlimited permission to copy and/or distribute it,
7
7
# with or without modifications, as long as this notice is preserved.
11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
13
13
 
 
14
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
14
15
m4_ifndef([AC_AUTOCONF_VERSION],
15
16
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
17
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17
18
[m4_warning([this file was generated for autoconf 2.68.
18
19
You have another version of autoconf.  It may work, but is not guaranteed to.
19
20
If you have problems, you may need to regenerate the build system entirely.
20
 
To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
21
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
21
22
 
22
 
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 
23
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
23
24
#
24
25
# This file is free software; the Free Software Foundation
25
26
# gives unlimited permission to copy and/or distribute it,
31
32
# generated from the m4 files accompanying Automake X.Y.
32
33
# (This private macro should not be called outside this file.)
33
34
AC_DEFUN([AM_AUTOMAKE_VERSION],
34
 
[am__api_version='1.11'
 
35
[am__api_version='1.14'
35
36
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
36
37
dnl require some minimum version.  Point them to the right macro.
37
 
m4_if([$1], [1.11.1], [],
 
38
m4_if([$1], [1.14], [],
38
39
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
39
40
])
40
41
 
50
51
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
51
52
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
52
53
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53
 
[AM_AUTOMAKE_VERSION([1.11.1])dnl
 
54
[AM_AUTOMAKE_VERSION([1.14])dnl
54
55
m4_ifndef([AC_AUTOCONF_VERSION],
55
56
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
56
57
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
57
58
 
58
59
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
59
60
 
60
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
61
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
61
62
#
62
63
# This file is free software; the Free Software Foundation
63
64
# gives unlimited permission to copy and/or distribute it,
64
65
# with or without modifications, as long as this notice is preserved.
65
66
 
66
67
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
67
 
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
68
 
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 
68
# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
 
69
# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
69
70
#
70
71
# Of course, Automake must honor this variable whenever it calls a
71
72
# tool from the auxiliary directory.  The problem is that $srcdir (and
84
85
#
85
86
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
86
87
# are both prefixed by $srcdir.  In an in-source build this is usually
87
 
# harmless because $srcdir is `.', but things will broke when you
 
88
# harmless because $srcdir is '.', but things will broke when you
88
89
# start a VPATH build or use an absolute $srcdir.
89
90
#
90
91
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
110
111
 
111
112
# AM_CONDITIONAL                                            -*- Autoconf -*-
112
113
 
113
 
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
114
 
# Free Software Foundation, Inc.
 
114
# Copyright (C) 1997-2013 Free Software Foundation, Inc.
115
115
#
116
116
# This file is free software; the Free Software Foundation
117
117
# gives unlimited permission to copy and/or distribute it,
118
118
# with or without modifications, as long as this notice is preserved.
119
119
 
120
 
# serial 9
121
 
 
122
120
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
123
121
# -------------------------------------
124
122
# Define a conditional.
125
123
AC_DEFUN([AM_CONDITIONAL],
126
 
[AC_PREREQ(2.52)dnl
127
 
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
128
 
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
124
[AC_PREREQ([2.52])dnl
 
125
 m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
126
       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
129
127
AC_SUBST([$1_TRUE])dnl
130
128
AC_SUBST([$1_FALSE])dnl
131
129
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
144
142
Usually this means the macro was only invoked conditionally.]])
145
143
fi])])
146
144
 
147
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
148
 
# Free Software Foundation, Inc.
 
145
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
149
146
#
150
147
# This file is free software; the Free Software Foundation
151
148
# gives unlimited permission to copy and/or distribute it,
152
149
# with or without modifications, as long as this notice is preserved.
153
150
 
154
 
# serial 10
155
151
 
156
 
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 
152
# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
157
153
# written in clear, in which case automake, when reading aclocal.m4,
158
154
# will think it sees a *use*, and therefore will trigger all it's
159
155
# C support machinery.  Also note that it means that autoscan, seeing
163
159
# _AM_DEPENDENCIES(NAME)
164
160
# ----------------------
165
161
# See how the compiler implements dependency checking.
166
 
# NAME is "CC", "CXX", "GCJ", or "OBJC".
 
162
# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
167
163
# We try a few techniques and use that to set a single cache variable.
168
164
#
169
165
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
176
172
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
177
173
AC_REQUIRE([AM_DEP_TRACK])dnl
178
174
 
179
 
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
180
 
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
181
 
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
182
 
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
183
 
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
184
 
                   [depcc="$$1"   am_compiler_list=])
 
175
m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
 
176
      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
 
177
      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 
178
      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
 
179
      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
 
180
      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 
181
                    [depcc="$$1"   am_compiler_list=])
185
182
 
186
183
AC_CACHE_CHECK([dependency style of $depcc],
187
184
               [am_cv_$1_dependencies_compiler_type],
189
186
  # We make a subdir and do the tests there.  Otherwise we can end up
190
187
  # making bogus files that we don't know about and never remove.  For
191
188
  # instance it was reported that on HP-UX the gcc test will end up
192
 
  # making a dummy file named `D' -- because `-MD' means `put the output
193
 
  # in D'.
 
189
  # making a dummy file named 'D' -- because '-MD' means "put the output
 
190
  # in D".
 
191
  rm -rf conftest.dir
194
192
  mkdir conftest.dir
195
193
  # Copy depcomp to subdir because otherwise we won't find it if we're
196
194
  # using a relative directory.
229
227
    : > sub/conftest.c
230
228
    for i in 1 2 3 4 5 6; do
231
229
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
232
 
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
233
 
      # Solaris 8's {/usr,}/bin/sh.
234
 
      touch sub/conftst$i.h
 
230
      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
 
231
      # Solaris 10 /bin/sh.
 
232
      echo '/* dummy */' > sub/conftst$i.h
235
233
    done
236
234
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
237
235
 
238
 
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
 
236
    # We check with '-c' and '-o' for the sake of the "dashmstdout"
239
237
    # mode.  It turns out that the SunPro C++ compiler does not properly
240
 
    # handle `-M -o', and we need to detect this.  Also, some Intel
241
 
    # versions had trouble with output in subdirs
 
238
    # handle '-M -o', and we need to detect this.  Also, some Intel
 
239
    # versions had trouble with output in subdirs.
242
240
    am__obj=sub/conftest.${OBJEXT-o}
243
241
    am__minus_obj="-o $am__obj"
244
242
    case $depmode in
247
245
      test "$am__universal" = false || continue
248
246
      ;;
249
247
    nosideeffect)
250
 
      # after this tag, mechanisms are not by side-effect, so they'll
251
 
      # only be used when explicitly requested
 
248
      # After this tag, mechanisms are not by side-effect, so they'll
 
249
      # only be used when explicitly requested.
252
250
      if test "x$enable_dependency_tracking" = xyes; then
253
251
        continue
254
252
      else
255
253
        break
256
254
      fi
257
255
      ;;
258
 
    msvisualcpp | msvcmsys)
259
 
      # This compiler won't grok `-c -o', but also, the minuso test has
 
256
    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
 
257
      # This compiler won't grok '-c -o', but also, the minuso test has
260
258
      # not run yet.  These depmodes are late enough in the game, and
261
259
      # so weak that their functioning should not be impacted.
262
260
      am__obj=conftest.${OBJEXT-o}
304
302
# AM_SET_DEPDIR
305
303
# -------------
306
304
# Choose a directory name for dependency files.
307
 
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
 
305
# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
308
306
AC_DEFUN([AM_SET_DEPDIR],
309
307
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
310
308
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
314
312
# AM_DEP_TRACK
315
313
# ------------
316
314
AC_DEFUN([AM_DEP_TRACK],
317
 
[AC_ARG_ENABLE(dependency-tracking,
318
 
[  --disable-dependency-tracking  speeds up one-time build
319
 
  --enable-dependency-tracking   do not reject slow dependency extractors])
 
315
[AC_ARG_ENABLE([dependency-tracking], [dnl
 
316
AS_HELP_STRING(
 
317
  [--enable-dependency-tracking],
 
318
  [do not reject slow dependency extractors])
 
319
AS_HELP_STRING(
 
320
  [--disable-dependency-tracking],
 
321
  [speeds up one-time build])])
320
322
if test "x$enable_dependency_tracking" != xno; then
321
323
  am_depcomp="$ac_aux_dir/depcomp"
322
324
  AMDEPBACKSLASH='\'
 
325
  am__nodep='_no'
323
326
fi
324
327
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
325
328
AC_SUBST([AMDEPBACKSLASH])dnl
326
329
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 
330
AC_SUBST([am__nodep])dnl
 
331
_AM_SUBST_NOTMAKE([am__nodep])dnl
327
332
])
328
333
 
329
334
# Generate code to set up dependency tracking.              -*- Autoconf -*-
330
335
 
331
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
332
 
# Free Software Foundation, Inc.
 
336
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
333
337
#
334
338
# This file is free software; the Free Software Foundation
335
339
# gives unlimited permission to copy and/or distribute it,
336
340
# with or without modifications, as long as this notice is preserved.
337
341
 
338
 
#serial 5
339
342
 
340
343
# _AM_OUTPUT_DEPENDENCY_COMMANDS
341
344
# ------------------------------
342
345
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
343
346
[{
344
 
  # Autoconf 2.62 quotes --file arguments for eval, but not when files
 
347
  # Older Autoconf quotes --file arguments for eval, but not when files
345
348
  # are listed without --file.  Let's play safe and only enable the eval
346
349
  # if we detect the quoting.
347
350
  case $CONFIG_FILES in
354
357
    # Strip MF so we end up with the name of the file.
355
358
    mf=`echo "$mf" | sed -e 's/:.*$//'`
356
359
    # Check whether this is an Automake generated Makefile or not.
357
 
    # We used to match only the files named `Makefile.in', but
 
360
    # We used to match only the files named 'Makefile.in', but
358
361
    # some people rename them; so instead we look at the file content.
359
362
    # Grep'ing the first line is not enough: some people post-process
360
363
    # each Makefile.in and add a new line on top of each file to say so.
366
369
      continue
367
370
    fi
368
371
    # Extract the definition of DEPDIR, am__include, and am__quote
369
 
    # from the Makefile without running `make'.
 
372
    # from the Makefile without running 'make'.
370
373
    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
371
374
    test -z "$DEPDIR" && continue
372
375
    am__include=`sed -n 's/^am__include = //p' < "$mf"`
373
 
    test -z "am__include" && continue
 
376
    test -z "$am__include" && continue
374
377
    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
375
 
    # When using ansi2knr, U may be empty or an underscore; expand it
376
 
    U=`sed -n 's/^U = //p' < "$mf"`
377
378
    # Find all dependency output files, they are included files with
378
379
    # $(DEPDIR) in their names.  We invoke sed twice because it is the
379
380
    # simplest approach to changing $(DEPDIR) to its actual value in the
380
381
    # expansion.
381
382
    for file in `sed -n "
382
383
      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
383
 
         sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
 
384
         sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
384
385
      # Make sure the directory exists.
385
386
      test -f "$dirpart/$file" && continue
386
387
      fdir=`AS_DIRNAME(["$file"])`
398
399
# This macro should only be invoked once -- use via AC_REQUIRE.
399
400
#
400
401
# This code is only required when automatic dependency tracking
401
 
# is enabled.  FIXME.  This creates each `.P' file that we will
 
402
# is enabled.  FIXME.  This creates each '.P' file that we will
402
403
# need in order to bootstrap the dependency handling code.
403
404
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
404
405
[AC_CONFIG_COMMANDS([depfiles],
408
409
 
409
410
# Do all the work for Automake.                             -*- Autoconf -*-
410
411
 
411
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
412
 
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 
412
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
413
413
#
414
414
# This file is free software; the Free Software Foundation
415
415
# gives unlimited permission to copy and/or distribute it,
416
416
# with or without modifications, as long as this notice is preserved.
417
417
 
418
 
# serial 16
419
 
 
420
418
# This macro actually does too much.  Some checks are only needed if
421
419
# your package does certain things.  But this isn't really a big deal.
422
420
 
 
421
dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
 
422
m4_define([AC_PROG_CC],
 
423
m4_defn([AC_PROG_CC])
 
424
[_AM_PROG_CC_C_O
 
425
])
 
426
 
423
427
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
424
428
# AM_INIT_AUTOMAKE([OPTIONS])
425
429
# -----------------------------------------------
432
436
# arguments mandatory, and then we can depend on a new Autoconf
433
437
# release and drop the old call support.
434
438
AC_DEFUN([AM_INIT_AUTOMAKE],
435
 
[AC_PREREQ([2.62])dnl
 
439
[AC_PREREQ([2.65])dnl
436
440
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
437
441
dnl the ones we care about.
438
442
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
461
465
# Define the identity of the package.
462
466
dnl Distinguish between old-style and new-style calls.
463
467
m4_ifval([$2],
464
 
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
468
[AC_DIAGNOSE([obsolete],
 
469
             [$0: two- and three-arguments forms are deprecated.])
 
470
m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
465
471
 AC_SUBST([PACKAGE], [$1])dnl
466
472
 AC_SUBST([VERSION], [$2])],
467
473
[_AM_SET_OPTIONS([$1])dnl
468
474
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
469
 
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
 
475
m4_if(
 
476
  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
 
477
  [ok:ok],,
470
478
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
471
479
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
472
480
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
473
481
 
474
482
_AM_IF_OPTION([no-define],,
475
 
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
476
 
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
483
[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
 
484
 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
477
485
 
478
486
# Some tools Automake needs.
479
487
AC_REQUIRE([AM_SANITY_CHECK])dnl
480
488
AC_REQUIRE([AC_ARG_PROGRAM])dnl
481
 
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
482
 
AM_MISSING_PROG(AUTOCONF, autoconf)
483
 
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
484
 
AM_MISSING_PROG(AUTOHEADER, autoheader)
485
 
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
489
AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
 
490
AM_MISSING_PROG([AUTOCONF], [autoconf])
 
491
AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
 
492
AM_MISSING_PROG([AUTOHEADER], [autoheader])
 
493
AM_MISSING_PROG([MAKEINFO], [makeinfo])
486
494
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
487
495
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
488
 
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 
496
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 
497
# For better backward compatibility.  To be removed once Automake 1.9.x
 
498
# dies out for good.  For more background, see:
 
499
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
 
500
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 
501
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
489
502
# We need awk for the "check" target.  The system "awk" is bad on
490
503
# some platforms.
491
504
AC_REQUIRE([AC_PROG_AWK])dnl
496
509
                             [_AM_PROG_TAR([v7])])])
497
510
_AM_IF_OPTION([no-dependencies],,
498
511
[AC_PROVIDE_IFELSE([AC_PROG_CC],
499
 
                  [_AM_DEPENDENCIES(CC)],
500
 
                  [define([AC_PROG_CC],
501
 
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
512
                  [_AM_DEPENDENCIES([CC])],
 
513
                  [m4_define([AC_PROG_CC],
 
514
                             m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
502
515
AC_PROVIDE_IFELSE([AC_PROG_CXX],
503
 
                  [_AM_DEPENDENCIES(CXX)],
504
 
                  [define([AC_PROG_CXX],
505
 
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
516
                  [_AM_DEPENDENCIES([CXX])],
 
517
                  [m4_define([AC_PROG_CXX],
 
518
                             m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
506
519
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
507
 
                  [_AM_DEPENDENCIES(OBJC)],
508
 
                  [define([AC_PROG_OBJC],
509
 
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 
520
                  [_AM_DEPENDENCIES([OBJC])],
 
521
                  [m4_define([AC_PROG_OBJC],
 
522
                             m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
 
523
AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
 
524
                  [_AM_DEPENDENCIES([OBJCXX])],
 
525
                  [m4_define([AC_PROG_OBJCXX],
 
526
                             m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
510
527
])
511
 
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
512
 
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
513
 
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
514
 
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
 
528
AC_REQUIRE([AM_SILENT_RULES])dnl
 
529
dnl The testsuite driver may need to know about EXEEXT, so add the
 
530
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
 
531
dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
515
532
AC_CONFIG_COMMANDS_PRE(dnl
516
533
[m4_provide_if([_AM_COMPILER_EXEEXT],
517
534
  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
518
 
])
519
 
 
520
 
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 
535
 
 
536
# POSIX will say in a future version that running "rm -f" with no argument
 
537
# is OK; and we want to be able to make that assumption in our Makefile
 
538
# recipes.  So use an aggressive probe to check that the usage we want is
 
539
# actually supported "in the wild" to an acceptable degree.
 
540
# See automake bug#10828.
 
541
# To make any issue more visible, cause the running configure to be aborted
 
542
# by default if the 'rm' program in use doesn't match our expectations; the
 
543
# user can still override this though.
 
544
if rm -f && rm -fr && rm -rf; then : OK; else
 
545
  cat >&2 <<'END'
 
546
Oops!
 
547
 
 
548
Your 'rm' program seems unable to run without file operands specified
 
549
on the command line, even when the '-f' option is present.  This is contrary
 
550
to the behaviour of most rm programs out there, and not conforming with
 
551
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
 
552
 
 
553
Please tell bug-automake@gnu.org about your system, including the value
 
554
of your $PATH and any error possibly output before this message.  This
 
555
can help us improve future automake versions.
 
556
 
 
557
END
 
558
  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
 
559
    echo 'Configuration will proceed anyway, since you have set the' >&2
 
560
    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
 
561
    echo >&2
 
562
  else
 
563
    cat >&2 <<'END'
 
564
Aborting the configuration process, to ensure you take notice of the issue.
 
565
 
 
566
You can download and install GNU coreutils to get an 'rm' implementation
 
567
that behaves properly: <http://www.gnu.org/software/coreutils/>.
 
568
 
 
569
If you want to complete the configuration process using your problematic
 
570
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
 
571
to "yes", and re-run configure.
 
572
 
 
573
END
 
574
    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
 
575
  fi
 
576
fi])
 
577
 
 
578
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
521
579
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
522
580
dnl mangled by Autoconf and run in a shell conditional statement.
523
581
m4_define([_AC_COMPILER_EXEEXT],
524
582
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
525
583
 
526
 
 
527
584
# When config.status generates a header, we must update the stamp-h file.
528
585
# This file resides in the same directory as the config header
529
586
# that is generated.  The stamp files are numbered to have different names.
545
602
done
546
603
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
547
604
 
548
 
# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
 
605
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
549
606
#
550
607
# This file is free software; the Free Software Foundation
551
608
# gives unlimited permission to copy and/or distribute it,
564
621
    install_sh="\${SHELL} $am_aux_dir/install-sh"
565
622
  esac
566
623
fi
567
 
AC_SUBST(install_sh)])
 
624
AC_SUBST([install_sh])])
568
625
 
569
 
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 
626
# Copyright (C) 2003-2013 Free Software Foundation, Inc.
570
627
#
571
628
# This file is free software; the Free Software Foundation
572
629
# gives unlimited permission to copy and/or distribute it,
573
630
# with or without modifications, as long as this notice is preserved.
574
631
 
575
 
# serial 2
576
 
 
577
632
# Check whether the underlying file-system supports filenames
578
633
# with a leading dot.  For instance MS-DOS doesn't.
579
634
AC_DEFUN([AM_SET_LEADING_DOT],
590
645
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
591
646
# From Jim Meyering
592
647
 
593
 
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
594
 
# Free Software Foundation, Inc.
 
648
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
595
649
#
596
650
# This file is free software; the Free Software Foundation
597
651
# gives unlimited permission to copy and/or distribute it,
598
652
# with or without modifications, as long as this notice is preserved.
599
653
 
600
 
# serial 5
601
 
 
602
654
# AM_MAINTAINER_MODE([DEFAULT-MODE])
603
655
# ----------------------------------
604
656
# Control maintainer-specific portions of Makefiles.
605
 
# Default is to disable them, unless `enable' is passed literally.
606
 
# For symmetry, `disable' may be passed as well.  Anyway, the user
 
657
# Default is to disable them, unless 'enable' is passed literally.
 
658
# For symmetry, 'disable' may be passed as well.  Anyway, the user
607
659
# can override the default with the --enable/--disable switch.
608
660
AC_DEFUN([AM_MAINTAINER_MODE],
609
661
[m4_case(m4_default([$1], [disable]),
611
663
       [disable], [m4_define([am_maintainer_other], [enable])],
612
664
       [m4_define([am_maintainer_other], [enable])
613
665
        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
614
 
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
 
666
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
615
667
  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
616
668
  AC_ARG_ENABLE([maintainer-mode],
617
 
[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
618
 
                          (and sometimes confusing) to the casual installer],
619
 
      [USE_MAINTAINER_MODE=$enableval],
620
 
      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
 
669
    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
 
670
      am_maintainer_other[ make rules and dependencies not useful
 
671
      (and sometimes confusing) to the casual installer])],
 
672
    [USE_MAINTAINER_MODE=$enableval],
 
673
    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
621
674
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
622
675
  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
623
676
  MAINT=$MAINTAINER_MODE_TRUE
625
678
]
626
679
)
627
680
 
628
 
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
629
 
 
630
681
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
631
682
 
632
 
# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
 
683
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
633
684
#
634
685
# This file is free software; the Free Software Foundation
635
686
# gives unlimited permission to copy and/or distribute it,
636
687
# with or without modifications, as long as this notice is preserved.
637
688
 
638
 
# serial 4
639
 
 
640
689
# AM_MAKE_INCLUDE()
641
690
# -----------------
642
691
# Check to see how make treats includes.
654
703
_am_result=none
655
704
# First try GNU make style include.
656
705
echo "include confinc" > confmf
657
 
# Ignore all kinds of additional output from `make'.
 
706
# Ignore all kinds of additional output from 'make'.
658
707
case `$am_make -s -f confmf 2> /dev/null` in #(
659
708
*the\ am__doit\ target*)
660
709
  am__include=include
681
730
 
682
731
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
683
732
 
684
 
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
685
 
# Free Software Foundation, Inc.
 
733
# Copyright (C) 1997-2013 Free Software Foundation, Inc.
686
734
#
687
735
# This file is free software; the Free Software Foundation
688
736
# gives unlimited permission to copy and/or distribute it,
689
737
# with or without modifications, as long as this notice is preserved.
690
738
 
691
 
# serial 6
692
 
 
693
739
# AM_MISSING_PROG(NAME, PROGRAM)
694
740
# ------------------------------
695
741
AC_DEFUN([AM_MISSING_PROG],
697
743
$1=${$1-"${am_missing_run}$2"}
698
744
AC_SUBST($1)])
699
745
 
700
 
 
701
746
# AM_MISSING_HAS_RUN
702
747
# ------------------
703
 
# Define MISSING if not defined so far and test if it supports --run.
704
 
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
748
# Define MISSING if not defined so far and test if it is modern enough.
 
749
# If it is, set am_missing_run to use it, otherwise, to nothing.
705
750
AC_DEFUN([AM_MISSING_HAS_RUN],
706
751
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
707
752
AC_REQUIRE_AUX_FILE([missing])dnl
714
759
  esac
715
760
fi
716
761
# Use eval to expand $SHELL
717
 
if eval "$MISSING --run true"; then
718
 
  am_missing_run="$MISSING --run "
 
762
if eval "$MISSING --is-lightweight"; then
 
763
  am_missing_run="$MISSING "
719
764
else
720
765
  am_missing_run=
721
 
  AC_MSG_WARN([`missing' script is too old or missing])
 
766
  AC_MSG_WARN(['missing' script is too old or missing])
722
767
fi
723
768
])
724
769
 
725
 
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
726
 
#
727
 
# This file is free software; the Free Software Foundation
728
 
# gives unlimited permission to copy and/or distribute it,
729
 
# with or without modifications, as long as this notice is preserved.
730
 
 
731
 
# AM_PROG_MKDIR_P
732
 
# ---------------
733
 
# Check for `mkdir -p'.
734
 
AC_DEFUN([AM_PROG_MKDIR_P],
735
 
[AC_PREREQ([2.60])dnl
736
 
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
737
 
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
738
 
dnl while keeping a definition of mkdir_p for backward compatibility.
739
 
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
740
 
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
741
 
dnl Makefile.ins that do not define MKDIR_P, so we do our own
742
 
dnl adjustment using top_builddir (which is defined more often than
743
 
dnl MKDIR_P).
744
 
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
745
 
case $mkdir_p in
746
 
  [[\\/$]]* | ?:[[\\/]]*) ;;
747
 
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
748
 
esac
749
 
])
750
 
 
751
770
# Helper functions for option handling.                     -*- Autoconf -*-
752
771
 
753
 
# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
 
772
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
754
773
#
755
774
# This file is free software; the Free Software Foundation
756
775
# gives unlimited permission to copy and/or distribute it,
757
776
# with or without modifications, as long as this notice is preserved.
758
777
 
759
 
# serial 4
760
 
 
761
778
# _AM_MANGLE_OPTION(NAME)
762
779
# -----------------------
763
780
AC_DEFUN([_AM_MANGLE_OPTION],
764
781
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
765
782
 
766
783
# _AM_SET_OPTION(NAME)
767
 
# ------------------------------
 
784
# --------------------
768
785
# Set option NAME.  Presently that only means defining a flag for this option.
769
786
AC_DEFUN([_AM_SET_OPTION],
770
 
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
787
[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
771
788
 
772
789
# _AM_SET_OPTIONS(OPTIONS)
773
 
# ----------------------------------
 
790
# ------------------------
774
791
# OPTIONS is a space-separated list of Automake options.
775
792
AC_DEFUN([_AM_SET_OPTIONS],
776
793
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
781
798
AC_DEFUN([_AM_IF_OPTION],
782
799
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
783
800
 
 
801
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 
802
#
 
803
# This file is free software; the Free Software Foundation
 
804
# gives unlimited permission to copy and/or distribute it,
 
805
# with or without modifications, as long as this notice is preserved.
 
806
 
 
807
# _AM_PROG_CC_C_O
 
808
# ---------------
 
809
# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
 
810
# to automatically call this.
 
811
AC_DEFUN([_AM_PROG_CC_C_O],
 
812
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
813
AC_REQUIRE_AUX_FILE([compile])dnl
 
814
AC_LANG_PUSH([C])dnl
 
815
AC_CACHE_CHECK(
 
816
  [whether $CC understands -c and -o together],
 
817
  [am_cv_prog_cc_c_o],
 
818
  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
 
819
  # Make sure it works both with $CC and with simple cc.
 
820
  # Following AC_PROG_CC_C_O, we do the test twice because some
 
821
  # compilers refuse to overwrite an existing .o file with -o,
 
822
  # though they will create one.
 
823
  am_cv_prog_cc_c_o=yes
 
824
  for am_i in 1 2; do
 
825
    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
 
826
         && test -f conftest2.$ac_objext; then
 
827
      : OK
 
828
    else
 
829
      am_cv_prog_cc_c_o=no
 
830
      break
 
831
    fi
 
832
  done
 
833
  rm -f core conftest*
 
834
  unset am_i])
 
835
if test "$am_cv_prog_cc_c_o" != yes; then
 
836
   # Losing compiler, so override with the script.
 
837
   # FIXME: It is wrong to rewrite CC.
 
838
   # But if we don't then we get into trouble of one sort or another.
 
839
   # A longer-term fix would be to have automake use am__CC in this case,
 
840
   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
 
841
   CC="$am_aux_dir/compile $CC"
 
842
fi
 
843
AC_LANG_POP([C])])
 
844
 
 
845
# For backward compatibility.
 
846
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 
847
 
 
848
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 
849
#
 
850
# This file is free software; the Free Software Foundation
 
851
# gives unlimited permission to copy and/or distribute it,
 
852
# with or without modifications, as long as this notice is preserved.
 
853
 
 
854
# AM_RUN_LOG(COMMAND)
 
855
# -------------------
 
856
# Run COMMAND, save the exit status in ac_status, and log it.
 
857
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
 
858
AC_DEFUN([AM_RUN_LOG],
 
859
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
 
860
   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
 
861
   ac_status=$?
 
862
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
863
   (exit $ac_status); }])
 
864
 
784
865
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
785
866
 
786
 
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
787
 
# Free Software Foundation, Inc.
 
867
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
788
868
#
789
869
# This file is free software; the Free Software Foundation
790
870
# gives unlimited permission to copy and/or distribute it,
791
871
# with or without modifications, as long as this notice is preserved.
792
872
 
793
 
# serial 5
794
 
 
795
873
# AM_SANITY_CHECK
796
874
# ---------------
797
875
AC_DEFUN([AM_SANITY_CHECK],
798
876
[AC_MSG_CHECKING([whether build environment is sane])
799
 
# Just in case
800
 
sleep 1
801
 
echo timestamp > conftest.file
802
877
# Reject unsafe characters in $srcdir or the absolute working directory
803
878
# name.  Accept space and tab only in the latter.
804
879
am_lf='
809
884
esac
810
885
case $srcdir in
811
886
  *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
812
 
    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
 
887
    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
813
888
esac
814
889
 
815
 
# Do `set' in a subshell so we don't clobber the current shell's
 
890
# Do 'set' in a subshell so we don't clobber the current shell's
816
891
# arguments.  Must try -L first in case configure is actually a
817
892
# symlink; some systems play weird games with the mod time of symlinks
818
893
# (eg FreeBSD returns the mod time of the symlink's containing
819
894
# directory).
820
895
if (
821
 
   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
822
 
   if test "$[*]" = "X"; then
823
 
      # -L didn't work.
824
 
      set X `ls -t "$srcdir/configure" conftest.file`
825
 
   fi
826
 
   rm -f conftest.file
827
 
   if test "$[*]" != "X $srcdir/configure conftest.file" \
828
 
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
829
 
 
830
 
      # If neither matched, then we have a broken ls.  This can happen
831
 
      # if, for instance, CONFIG_SHELL is bash and it inherits a
832
 
      # broken ls alias from the environment.  This has actually
833
 
      # happened.  Such a system could not be considered "sane".
834
 
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
835
 
alias in your environment])
836
 
   fi
837
 
 
 
896
   am_has_slept=no
 
897
   for am_try in 1 2; do
 
898
     echo "timestamp, slept: $am_has_slept" > conftest.file
 
899
     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
 
900
     if test "$[*]" = "X"; then
 
901
        # -L didn't work.
 
902
        set X `ls -t "$srcdir/configure" conftest.file`
 
903
     fi
 
904
     if test "$[*]" != "X $srcdir/configure conftest.file" \
 
905
        && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
906
 
 
907
        # If neither matched, then we have a broken ls.  This can happen
 
908
        # if, for instance, CONFIG_SHELL is bash and it inherits a
 
909
        # broken ls alias from the environment.  This has actually
 
910
        # happened.  Such a system could not be considered "sane".
 
911
        AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
912
  alias in your environment])
 
913
     fi
 
914
     if test "$[2]" = conftest.file || test $am_try -eq 2; then
 
915
       break
 
916
     fi
 
917
     # Just in case.
 
918
     sleep 1
 
919
     am_has_slept=yes
 
920
   done
838
921
   test "$[2]" = conftest.file
839
922
   )
840
923
then
844
927
   AC_MSG_ERROR([newly created file is older than distributed files!
845
928
Check your system clock])
846
929
fi
847
 
AC_MSG_RESULT(yes)])
 
930
AC_MSG_RESULT([yes])
 
931
# If we didn't sleep, we still need to ensure time stamps of config.status and
 
932
# generated files are strictly newer.
 
933
am_sleep_pid=
 
934
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
 
935
  ( sleep 1 ) &
 
936
  am_sleep_pid=$!
 
937
fi
 
938
AC_CONFIG_COMMANDS_PRE(
 
939
  [AC_MSG_CHECKING([that generated files are newer than configure])
 
940
   if test -n "$am_sleep_pid"; then
 
941
     # Hide warnings about reused PIDs.
 
942
     wait $am_sleep_pid 2>/dev/null
 
943
   fi
 
944
   AC_MSG_RESULT([done])])
 
945
rm -f conftest.file
 
946
])
848
947
 
849
 
# Copyright (C) 2009  Free Software Foundation, Inc.
 
948
# Copyright (C) 2009-2013 Free Software Foundation, Inc.
850
949
#
851
950
# This file is free software; the Free Software Foundation
852
951
# gives unlimited permission to copy and/or distribute it,
853
952
# with or without modifications, as long as this notice is preserved.
854
953
 
855
 
# serial 1
856
 
 
857
954
# AM_SILENT_RULES([DEFAULT])
858
955
# --------------------------
859
956
# Enable less verbose build rules; with the default set to DEFAULT
860
 
# (`yes' being less verbose, `no' or empty being verbose).
 
957
# ("yes" being less verbose, "no" or empty being verbose).
861
958
AC_DEFUN([AM_SILENT_RULES],
862
 
[AC_ARG_ENABLE([silent-rules],
863
 
[  --enable-silent-rules          less verbose build output (undo: `make V=1')
864
 
  --disable-silent-rules         verbose build output (undo: `make V=0')])
865
 
case $enable_silent_rules in
866
 
yes) AM_DEFAULT_VERBOSITY=0;;
867
 
no)  AM_DEFAULT_VERBOSITY=1;;
868
 
*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
 
959
[AC_ARG_ENABLE([silent-rules], [dnl
 
960
AS_HELP_STRING(
 
961
  [--enable-silent-rules],
 
962
  [less verbose build output (undo: "make V=1")])
 
963
AS_HELP_STRING(
 
964
  [--disable-silent-rules],
 
965
  [verbose build output (undo: "make V=0")])dnl
 
966
])
 
967
case $enable_silent_rules in @%:@ (((
 
968
  yes) AM_DEFAULT_VERBOSITY=0;;
 
969
   no) AM_DEFAULT_VERBOSITY=1;;
 
970
    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
869
971
esac
 
972
dnl
 
973
dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
 
974
dnl do not support nested variable expansions.
 
975
dnl See automake bug#9928 and bug#10237.
 
976
am_make=${MAKE-make}
 
977
AC_CACHE_CHECK([whether $am_make supports nested variables],
 
978
   [am_cv_make_support_nested_variables],
 
979
   [if AS_ECHO([['TRUE=$(BAR$(V))
 
980
BAR0=false
 
981
BAR1=true
 
982
V=1
 
983
am__doit:
 
984
        @$(TRUE)
 
985
.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
 
986
  am_cv_make_support_nested_variables=yes
 
987
else
 
988
  am_cv_make_support_nested_variables=no
 
989
fi])
 
990
if test $am_cv_make_support_nested_variables = yes; then
 
991
  dnl Using '$V' instead of '$(V)' breaks IRIX make.
 
992
  AM_V='$(V)'
 
993
  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
 
994
else
 
995
  AM_V=$AM_DEFAULT_VERBOSITY
 
996
  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
 
997
fi
 
998
AC_SUBST([AM_V])dnl
 
999
AM_SUBST_NOTMAKE([AM_V])dnl
 
1000
AC_SUBST([AM_DEFAULT_V])dnl
 
1001
AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
870
1002
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
871
1003
AM_BACKSLASH='\'
872
1004
AC_SUBST([AM_BACKSLASH])dnl
873
1005
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
874
1006
])
875
1007
 
876
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
1008
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
877
1009
#
878
1010
# This file is free software; the Free Software Foundation
879
1011
# gives unlimited permission to copy and/or distribute it,
881
1013
 
882
1014
# AM_PROG_INSTALL_STRIP
883
1015
# ---------------------
884
 
# One issue with vendor `install' (even GNU) is that you can't
 
1016
# One issue with vendor 'install' (even GNU) is that you can't
885
1017
# specify the program used to strip binaries.  This is especially
886
1018
# annoying in cross-compiling environments, where the build's strip
887
1019
# is unlikely to handle the host's binaries.
888
1020
# Fortunately install-sh will honor a STRIPPROG variable, so we
889
 
# always use install-sh in `make install-strip', and initialize
 
1021
# always use install-sh in "make install-strip", and initialize
890
1022
# STRIPPROG with the value of the STRIP variable (set by the user).
891
1023
AC_DEFUN([AM_PROG_INSTALL_STRIP],
892
1024
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
893
 
# Installed binaries are usually stripped using `strip' when the user
894
 
# run `make install-strip'.  However `strip' might not be the right
 
1025
# Installed binaries are usually stripped using 'strip' when the user
 
1026
# run "make install-strip".  However 'strip' might not be the right
895
1027
# tool to use in cross-compilation environments, therefore Automake
896
 
# will honor the `STRIP' environment variable to overrule this program.
897
 
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
1028
# will honor the 'STRIP' environment variable to overrule this program.
 
1029
dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
898
1030
if test "$cross_compiling" != no; then
899
1031
  AC_CHECK_TOOL([STRIP], [strip], :)
900
1032
fi
901
1033
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
902
1034
AC_SUBST([INSTALL_STRIP_PROGRAM])])
903
1035
 
904
 
# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
 
1036
# Copyright (C) 2006-2013 Free Software Foundation, Inc.
905
1037
#
906
1038
# This file is free software; the Free Software Foundation
907
1039
# gives unlimited permission to copy and/or distribute it,
908
1040
# with or without modifications, as long as this notice is preserved.
909
1041
 
910
 
# serial 2
911
 
 
912
1042
# _AM_SUBST_NOTMAKE(VARIABLE)
913
1043
# ---------------------------
914
1044
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
916
1046
AC_DEFUN([_AM_SUBST_NOTMAKE])
917
1047
 
918
1048
# AM_SUBST_NOTMAKE(VARIABLE)
919
 
# ---------------------------
 
1049
# --------------------------
920
1050
# Public sister of _AM_SUBST_NOTMAKE.
921
1051
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
922
1052
 
923
1053
# Check how to create a tarball.                            -*- Autoconf -*-
924
1054
 
925
 
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
1055
# Copyright (C) 2004-2013 Free Software Foundation, Inc.
926
1056
#
927
1057
# This file is free software; the Free Software Foundation
928
1058
# gives unlimited permission to copy and/or distribute it,
929
1059
# with or without modifications, as long as this notice is preserved.
930
1060
 
931
 
# serial 2
932
 
 
933
1061
# _AM_PROG_TAR(FORMAT)
934
1062
# --------------------
935
1063
# Check how to create a tarball in format FORMAT.
936
 
# FORMAT should be one of `v7', `ustar', or `pax'.
 
1064
# FORMAT should be one of 'v7', 'ustar', or 'pax'.
937
1065
#
938
1066
# Substitute a variable $(am__tar) that is a command
939
1067
# writing to stdout a FORMAT-tarball containing the directory
943
1071
# Substitute a variable $(am__untar) that extract such
944
1072
# a tarball read from stdin.
945
1073
#     $(am__untar) < result.tar
 
1074
#
946
1075
AC_DEFUN([_AM_PROG_TAR],
947
 
[# Always define AMTAR for backward compatibility.
948
 
AM_MISSING_PROG([AMTAR], [tar])
 
1076
[# Always define AMTAR for backward compatibility.  Yes, it's still used
 
1077
# in the wild :-(  We should find a proper way to deprecate it ...
 
1078
AC_SUBST([AMTAR], ['$${TAR-tar}'])
 
1079
 
 
1080
# We'll loop over all known methods to create a tar archive until one works.
 
1081
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 
1082
 
949
1083
m4_if([$1], [v7],
950
 
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
951
 
     [m4_case([$1], [ustar],, [pax],,
952
 
              [m4_fatal([Unknown tar format])])
953
 
AC_MSG_CHECKING([how to create a $1 tar archive])
954
 
# Loop over all known methods to create a tar archive until one works.
955
 
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
956
 
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
957
 
# Do not fold the above two line into one, because Tru64 sh and
958
 
# Solaris sh will not grok spaces in the rhs of `-'.
959
 
for _am_tool in $_am_tools
960
 
do
961
 
  case $_am_tool in
962
 
  gnutar)
963
 
    for _am_tar in tar gnutar gtar;
964
 
    do
965
 
      AM_RUN_LOG([$_am_tar --version]) && break
966
 
    done
967
 
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
968
 
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
969
 
    am__untar="$_am_tar -xf -"
970
 
    ;;
971
 
  plaintar)
972
 
    # Must skip GNU tar: if it does not support --format= it doesn't create
973
 
    # ustar tarball either.
974
 
    (tar --version) >/dev/null 2>&1 && continue
975
 
    am__tar='tar chf - "$$tardir"'
976
 
    am__tar_='tar chf - "$tardir"'
977
 
    am__untar='tar xf -'
978
 
    ;;
979
 
  pax)
980
 
    am__tar='pax -L -x $1 -w "$$tardir"'
981
 
    am__tar_='pax -L -x $1 -w "$tardir"'
982
 
    am__untar='pax -r'
983
 
    ;;
984
 
  cpio)
985
 
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
986
 
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
987
 
    am__untar='cpio -i -H $1 -d'
988
 
    ;;
989
 
  none)
990
 
    am__tar=false
991
 
    am__tar_=false
992
 
    am__untar=false
993
 
    ;;
994
 
  esac
995
 
 
996
 
  # If the value was cached, stop now.  We just wanted to have am__tar
997
 
  # and am__untar set.
998
 
  test -n "${am_cv_prog_tar_$1}" && break
999
 
 
1000
 
  # tar/untar a dummy directory, and stop if the command works
1001
 
  rm -rf conftest.dir
1002
 
  mkdir conftest.dir
1003
 
  echo GrepMe > conftest.dir/file
1004
 
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1005
 
  rm -rf conftest.dir
1006
 
  if test -s conftest.tar; then
1007
 
    AM_RUN_LOG([$am__untar <conftest.tar])
1008
 
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1009
 
  fi
1010
 
done
1011
 
rm -rf conftest.dir
1012
 
 
1013
 
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1014
 
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
1084
  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
 
1085
 
 
1086
  [m4_case([$1],
 
1087
    [ustar],
 
1088
     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
 
1089
      # There is notably a 21 bits limit for the UID and the GID.  In fact,
 
1090
      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
 
1091
      # and bug#13588).
 
1092
      am_max_uid=2097151 # 2^21 - 1
 
1093
      am_max_gid=$am_max_uid
 
1094
      # The $UID and $GID variables are not portable, so we need to resort
 
1095
      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
 
1096
      # below are definitely unexpected, so allow the users to see them
 
1097
      # (that is, avoid stderr redirection).
 
1098
      am_uid=`id -u || echo unknown`
 
1099
      am_gid=`id -g || echo unknown`
 
1100
      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
 
1101
      if test $am_uid -le $am_max_uid; then
 
1102
         AC_MSG_RESULT([yes])
 
1103
      else
 
1104
         AC_MSG_RESULT([no])
 
1105
         _am_tools=none
 
1106
      fi
 
1107
      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
 
1108
      if test $am_gid -le $am_max_gid; then
 
1109
         AC_MSG_RESULT([yes])
 
1110
      else
 
1111
        AC_MSG_RESULT([no])
 
1112
        _am_tools=none
 
1113
      fi],
 
1114
 
 
1115
  [pax],
 
1116
    [],
 
1117
 
 
1118
  [m4_fatal([Unknown tar format])])
 
1119
 
 
1120
  AC_MSG_CHECKING([how to create a $1 tar archive])
 
1121
 
 
1122
  # Go ahead even if we have the value already cached.  We do so because we
 
1123
  # need to set the values for the 'am__tar' and 'am__untar' variables.
 
1124
  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
 
1125
 
 
1126
  for _am_tool in $_am_tools; do
 
1127
    case $_am_tool in
 
1128
    gnutar)
 
1129
      for _am_tar in tar gnutar gtar; do
 
1130
        AM_RUN_LOG([$_am_tar --version]) && break
 
1131
      done
 
1132
      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 
1133
      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 
1134
      am__untar="$_am_tar -xf -"
 
1135
      ;;
 
1136
    plaintar)
 
1137
      # Must skip GNU tar: if it does not support --format= it doesn't create
 
1138
      # ustar tarball either.
 
1139
      (tar --version) >/dev/null 2>&1 && continue
 
1140
      am__tar='tar chf - "$$tardir"'
 
1141
      am__tar_='tar chf - "$tardir"'
 
1142
      am__untar='tar xf -'
 
1143
      ;;
 
1144
    pax)
 
1145
      am__tar='pax -L -x $1 -w "$$tardir"'
 
1146
      am__tar_='pax -L -x $1 -w "$tardir"'
 
1147
      am__untar='pax -r'
 
1148
      ;;
 
1149
    cpio)
 
1150
      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 
1151
      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 
1152
      am__untar='cpio -i -H $1 -d'
 
1153
      ;;
 
1154
    none)
 
1155
      am__tar=false
 
1156
      am__tar_=false
 
1157
      am__untar=false
 
1158
      ;;
 
1159
    esac
 
1160
 
 
1161
    # If the value was cached, stop now.  We just wanted to have am__tar
 
1162
    # and am__untar set.
 
1163
    test -n "${am_cv_prog_tar_$1}" && break
 
1164
 
 
1165
    # tar/untar a dummy directory, and stop if the command works.
 
1166
    rm -rf conftest.dir
 
1167
    mkdir conftest.dir
 
1168
    echo GrepMe > conftest.dir/file
 
1169
    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 
1170
    rm -rf conftest.dir
 
1171
    if test -s conftest.tar; then
 
1172
      AM_RUN_LOG([$am__untar <conftest.tar])
 
1173
      AM_RUN_LOG([cat conftest.dir/file])
 
1174
      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 
1175
    fi
 
1176
  done
 
1177
  rm -rf conftest.dir
 
1178
 
 
1179
  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 
1180
  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
1181
 
1015
1182
AC_SUBST([am__tar])
1016
1183
AC_SUBST([am__untar])
1017
1184
]) # _AM_PROG_TAR
1211
1378
# See the "minimum version" comment for each macro you use to see what 
1212
1379
# version you require.
1213
1380
m4_defun([XORG_MACROS_VERSION],[
1214
 
m4_define([vers_have], [1.16.1])
 
1381
m4_define([vers_have], [1.17])
1215
1382
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
1216
1383
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
1217
1384
m4_if(m4_cmp(maj_have, maj_needed), 0,,
2230
2397
AC_MSG_RESULT([$enable_unit_tests])
2231
2398
]) # XORG_ENABLE_UNIT_TESTS
2232
2399
 
 
2400
# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto)
 
2401
# ------------------------------------------------------
 
2402
# Minimum version: 1.17.0
 
2403
#
 
2404
# This macro enables a builder to enable/disable integration testing
 
2405
# It makes no assumption about the test cases' implementation
 
2406
# Test cases may or may not use Automake "Support for test suites"
 
2407
#
 
2408
# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support
 
2409
# usually requires less dependencies and may be built and run under less
 
2410
# stringent environments than integration tests.
 
2411
#
 
2412
# Interface to module:
 
2413
# ENABLE_INTEGRATION_TESTS:   used in makefiles to conditionally build tests
 
2414
# enable_integration_tests:   used in configure.ac for additional configuration
 
2415
# --enable-integration-tests: 'yes' user instructs the module to build tests
 
2416
#                             'no' user instructs the module not to build tests
 
2417
# parm1:                      specify the default value, yes or no.
 
2418
#
 
2419
AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[
 
2420
AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
 
2421
m4_define([_defopt], m4_default([$1], [auto]))
 
2422
AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests],
 
2423
        [Enable building integration test cases (default: ]_defopt[)]),
 
2424
        [enable_integration_tests=$enableval],
 
2425
        [enable_integration_tests=]_defopt)
 
2426
m4_undefine([_defopt])
 
2427
AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS],
 
2428
        [test "x$enable_integration_tests" != xno])
 
2429
AC_MSG_CHECKING([whether to build unit test cases])
 
2430
AC_MSG_RESULT([$enable_integration_tests])
 
2431
]) # XORG_ENABLE_INTEGRATION_TESTS
 
2432
 
2233
2433
# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
2234
2434
# ----------------------------------------
2235
2435
# Minimum version: 1.13.0
2240
2440
# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
2241
2441
# Otherwise the value of $enable_unit_tests is blank.
2242
2442
#
 
2443
# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit
 
2444
# test support usually requires less dependencies and may be built and run under
 
2445
# less stringent environments than integration tests.
 
2446
#
2243
2447
# Interface to module:
2244
2448
# HAVE_GLIB: used in makefiles to conditionally build targets
2245
2449
# with_glib: used in configure.ac to know if GLib has been found
2598
2802
#
2599
2803
# Checks for various brands of compilers and sets flags as appropriate:
2600
2804
#   GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
 
2805
#   GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
2601
2806
#   clang compiler - sets CLANGCC to "yes"
2602
2807
#   Intel compiler - sets INTELCC to "yes"
2603
2808
#   Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
2604
2809
#
2605
2810
AC_DEFUN([XORG_COMPILER_BRAND], [
2606
 
AC_REQUIRE([AC_PROG_CC_C99])
 
2811
AC_LANG_CASE(
 
2812
        [C], [
 
2813
                AC_REQUIRE([AC_PROG_CC_C99])
 
2814
        ],
 
2815
        [C++], [
 
2816
                AC_REQUIRE([AC_PROG_CXX])
 
2817
        ]
 
2818
)
2607
2819
AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
2608
2820
AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
2609
2821
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
2623
2835
# -Werror=unused-command-line-argument
2624
2836
#
2625
2837
AC_DEFUN([XORG_TESTSET_CFLAG], [
2626
 
AC_REQUIRE([AC_PROG_CC_C99])
2627
2838
m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
2628
2839
m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
2629
2840
 
2630
 
xorg_testset_save_CFLAGS="$CFLAGS"
2631
 
 
2632
 
if test "x$xorg_testset_unknown_warning_option" = "x" ; then
2633
 
        CFLAGS="$CFLAGS -Werror=unknown-warning-option"
2634
 
        AC_CACHE_CHECK([if $CC supports -Werror=unknown-warning-option],
2635
 
                        xorg_cv_cc_flag_unknown_warning_option,
 
2841
AC_LANG_COMPILER_REQUIRE
 
2842
 
 
2843
AC_LANG_CASE(
 
2844
        [C], [
 
2845
                AC_REQUIRE([AC_PROG_CC_C99])
 
2846
                define([PREFIX], [C])
 
2847
                define([CACHE_PREFIX], [cc])
 
2848
                define([COMPILER], [$CC])
 
2849
        ],
 
2850
        [C++], [
 
2851
                define([PREFIX], [CXX])
 
2852
                define([CACHE_PREFIX], [cxx])
 
2853
                define([COMPILER], [$CXX])
 
2854
        ]
 
2855
)
 
2856
 
 
2857
[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
 
2858
 
 
2859
if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then
 
2860
        PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
 
2861
        AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option],
 
2862
                        [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option],
2636
2863
                        AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
2637
 
                                          [xorg_cv_cc_flag_unknown_warning_option=yes],
2638
 
                                          [xorg_cv_cc_flag_unknown_warning_option=no]))
2639
 
        xorg_testset_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
2640
 
        CFLAGS="$xorg_testset_save_CFLAGS"
 
2864
                                          [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes],
 
2865
                                          [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no]))
 
2866
        [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option]
 
2867
        PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
2641
2868
fi
2642
2869
 
2643
 
if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
2644
 
        if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
2645
 
                CFLAGS="$CFLAGS -Werror=unknown-warning-option"
 
2870
if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then
 
2871
        if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then
 
2872
                PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
2646
2873
        fi
2647
 
        CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
2648
 
        AC_CACHE_CHECK([if $CC supports -Werror=unused-command-line-argument],
2649
 
                        xorg_cv_cc_flag_unused_command_line_argument,
 
2874
        PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
 
2875
        AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument],
 
2876
                        [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument],
2650
2877
                        AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
2651
 
                                          [xorg_cv_cc_flag_unused_command_line_argument=yes],
2652
 
                                          [xorg_cv_cc_flag_unused_command_line_argument=no]))
2653
 
        xorg_testset_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
2654
 
        CFLAGS="$xorg_testset_save_CFLAGS"
 
2878
                                          [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes],
 
2879
                                          [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no]))
 
2880
        [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument]
 
2881
        PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
2655
2882
fi
2656
2883
 
2657
2884
found="no"
2658
2885
m4_foreach([flag], m4_cdr($@), [
2659
2886
        if test $found = "no" ; then
2660
 
                if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
2661
 
                        CFLAGS="$CFLAGS -Werror=unknown-warning-option"
2662
 
                fi
2663
 
 
2664
 
                if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
2665
 
                        CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
2666
 
                fi
2667
 
 
2668
 
                CFLAGS="$CFLAGS ]flag["
 
2887
                if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then
 
2888
                        PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
 
2889
                fi
 
2890
 
 
2891
                if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
 
2892
                        PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
 
2893
                fi
 
2894
 
 
2895
                PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
2669
2896
 
2670
2897
dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
2671
 
                AC_MSG_CHECKING([if $CC supports ]flag[])
2672
 
                cacheid=`AS_ECHO_N([xorg_cv_cc_flag_]flag[])`
2673
 
                AC_CACHE_VAL(AS_TR_SH($cacheid),
 
2898
                AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[])
 
2899
                cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
 
2900
                AC_CACHE_VAL($cacheid,
2674
2901
                             [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
2675
 
                                             [eval AS_TR_SH($cacheid)=yes],
2676
 
                                             [eval AS_TR_SH($cacheid)=no])])
2677
 
 
2678
 
                CFLAGS="$xorg_testset_save_CFLAGS"
2679
 
 
2680
 
                eval supported=$AS_TR_SH($cacheid)
 
2902
                                             [eval $cacheid=yes],
 
2903
                                             [eval $cacheid=no])])
 
2904
 
 
2905
                PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
 
2906
 
 
2907
                eval supported=\$$cacheid
2681
2908
                AC_MSG_RESULT([$supported])
2682
2909
                if test "$supported" = "yes" ; then
2683
2910
                        $1="$$1 ]flag["
2691
2918
# ---------------
2692
2919
# Minimum version: 1.16.0
2693
2920
#
2694
 
# Defines BASE_CFLAGS to contain a set of command line arguments supported
2695
 
# by the selected compiler which do NOT alter the generated code.  These
2696
 
# arguments will cause the compiler to print various warnings during
2697
 
# compilation AND turn a conservative set of warnings into errors.
 
2921
# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
 
2922
# arguments supported by the selected compiler which do NOT alter the generated
 
2923
# code.  These arguments will cause the compiler to print various warnings
 
2924
# during compilation AND turn a conservative set of warnings into errors.
2698
2925
#
2699
 
# The set of flags supported by BASE_CFLAGS will grow in future
2700
 
# versions of util-macros as options are added to new compilers.
 
2926
# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
 
2927
# future versions of util-macros as options are added to new compilers.
2701
2928
#
2702
2929
AC_DEFUN([XORG_COMPILER_FLAGS], [
2703
2930
AC_REQUIRE([XORG_COMPILER_BRAND])
2708
2935
              [SELECTIVE_WERROR=$enableval],
2709
2936
              [SELECTIVE_WERROR=yes])
2710
2937
 
 
2938
AC_LANG_CASE(
 
2939
        [C], [
 
2940
                define([PREFIX], [C])
 
2941
        ],
 
2942
        [C++], [
 
2943
                define([PREFIX], [CXX])
 
2944
        ]
 
2945
)
2711
2946
# -v is too short to test reliably with XORG_TESTSET_CFLAG
2712
2947
if test "x$SUNCC" = "xyes"; then
2713
 
    BASE_CFLAGS="-v"
 
2948
    [BASE_]PREFIX[FLAGS]="-v"
2714
2949
else
2715
 
    BASE_CFLAGS=""
 
2950
    [BASE_]PREFIX[FLAGS]=""
2716
2951
fi
2717
2952
 
2718
2953
# This chunk of warnings were those that existed in the legacy CWARNFLAGS
2719
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wall])
2720
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wpointer-arith])
2721
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wstrict-prototypes])
2722
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-prototypes])
2723
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-declarations])
2724
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wnested-externs])
2725
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wbad-function-cast])
2726
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wformat=2], [-Wformat])
2727
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wold-style-definition])
2728
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wdeclaration-after-statement])
 
2954
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
 
2955
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
 
2956
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
 
2957
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
 
2958
 
 
2959
AC_LANG_CASE(
 
2960
        [C], [
 
2961
                XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
 
2962
                XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
 
2963
                XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
 
2964
                XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
 
2965
                XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition])
 
2966
                XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
 
2967
        ]
 
2968
)
2729
2969
 
2730
2970
# This chunk adds additional warnings that could catch undesired effects.
2731
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wunused])
2732
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wuninitialized])
2733
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wshadow])
2734
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wcast-qual])
2735
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-noreturn])
2736
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-format-attribute])
2737
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wredundant-decls])
 
2971
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
 
2972
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
 
2973
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
 
2974
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
 
2975
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
 
2976
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
 
2977
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
2738
2978
 
2739
2979
# These are currently disabled because they are noisy.  They will be enabled
2740
2980
# in the future once the codebase is sufficiently modernized to silence
2741
2981
# them.  For now, I don't want them to drown out the other warnings.
2742
 
# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wlogical-op])
2743
 
# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wparentheses])
2744
 
# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wcast-align])
 
2982
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
 
2983
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
 
2984
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
2745
2985
 
2746
2986
# Turn some warnings into errors, so we don't accidently get successful builds
2747
2987
# when there are problems that should be fixed.
2748
2988
 
2749
2989
if test "x$SELECTIVE_WERROR" = "xyes" ; then
2750
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
2751
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=nonnull])
2752
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=init-self])
2753
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=main])
2754
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=missing-braces])
2755
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=sequence-point])
2756
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
2757
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=trigraphs])
2758
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=array-bounds])
2759
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=write-strings])
2760
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=address])
2761
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
2762
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
 
2990
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
 
2991
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
 
2992
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
 
2993
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
 
2994
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
 
2995
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
 
2996
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
 
2997
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
 
2998
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
 
2999
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
 
3000
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
 
3001
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
 
3002
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
2763
3003
else
2764
3004
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])
2765
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wimplicit])
2766
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wnonnull])
2767
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Winit-self])
2768
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmain])
2769
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-braces])
2770
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wsequence-point])
2771
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wreturn-type])
2772
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wtrigraphs])
2773
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Warray-bounds])
2774
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wwrite-strings])
2775
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Waddress])
2776
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wint-to-pointer-cast])
2777
 
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wpointer-to-int-cast])
 
3005
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
 
3006
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
 
3007
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
 
3008
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
 
3009
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
 
3010
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
 
3011
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
 
3012
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
 
3013
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
 
3014
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
 
3015
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
 
3016
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
 
3017
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
2778
3018
fi
2779
3019
 
2780
 
AC_SUBST([BASE_CFLAGS])
 
3020
AC_SUBST([BASE_]PREFIX[FLAGS])
2781
3021
]) # XORG_COMPILER_FLAGS
2782
3022
 
2783
3023
# XORG_CWARNFLAGS
2795
3035
AC_DEFUN([XORG_CWARNFLAGS], [
2796
3036
AC_REQUIRE([XORG_COMPILER_FLAGS])
2797
3037
AC_REQUIRE([XORG_COMPILER_BRAND])
2798
 
CWARNFLAGS="$BASE_CFLAGS"
2799
 
if  test "x$GCC" = xyes ; then
2800
 
    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
2801
 
fi
2802
 
AC_SUBST(CWARNFLAGS)
 
3038
AC_LANG_CASE(
 
3039
        [C], [
 
3040
                CWARNFLAGS="$BASE_CFLAGS"
 
3041
                if  test "x$GCC" = xyes ; then
 
3042
                    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
 
3043
                fi
 
3044
                AC_SUBST(CWARNFLAGS)
 
3045
        ]
 
3046
)
2803
3047
]) # XORG_CWARNFLAGS
2804
3048
 
2805
3049
# XORG_STRICT_OPTION
2809
3053
# Add configure option to enable strict compilation flags, such as treating
2810
3054
# warnings as fatal errors.
2811
3055
# If --enable-strict-compilation is passed to configure, adds strict flags to
2812
 
# $BASE_CFLAGS and the deprecated $CWARNFLAGS.
 
3056
# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
2813
3057
#
2814
3058
# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
2815
3059
# when strict compilation is unconditionally desired.
2822
3066
                          [Enable all warnings from compiler and make them errors (default: disabled)]),
2823
3067
                          [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
2824
3068
 
2825
 
STRICT_CFLAGS=""
2826
 
XORG_TESTSET_CFLAG([STRICT_CFLAGS], [-pedantic])
2827
 
XORG_TESTSET_CFLAG([STRICT_CFLAGS], [-Werror], [-errwarn])
 
3069
AC_LANG_CASE(
 
3070
        [C], [
 
3071
                define([PREFIX], [C])
 
3072
        ],
 
3073
        [C++], [
 
3074
                define([PREFIX], [CXX])
 
3075
        ]
 
3076
)
 
3077
 
 
3078
[STRICT_]PREFIX[FLAGS]=""
 
3079
XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
 
3080
XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
2828
3081
 
2829
3082
# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
2830
3083
# activate it with -Werror, so we add it here explicitly.
2831
 
XORG_TESTSET_CFLAG([STRICT_CFLAGS], [-Werror=attributes])
 
3084
XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
2832
3085
 
2833
3086
if test "x$STRICT_COMPILE" = "xyes"; then
2834
 
    BASE_CFLAGS="$BASE_CFLAGS $STRICT_CFLAGS"
2835
 
    CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
 
3087
    [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
 
3088
    AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
2836
3089
fi
2837
 
AC_SUBST([STRICT_CFLAGS])
2838
 
AC_SUBST([BASE_CFLAGS])
2839
 
AC_SUBST([CWARNFLAGS])
 
3090
AC_SUBST([STRICT_]PREFIX[FLAGS])
 
3091
AC_SUBST([BASE_]PREFIX[FLAGS])
 
3092
AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
2840
3093
]) # XORG_STRICT_OPTION
2841
3094
 
2842
3095
# XORG_DEFAULT_OPTIONS