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]))])
58
59
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
60
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
61
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
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.
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/../..'.
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
176
172
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
177
173
AC_REQUIRE([AM_DEP_TRACK])dnl
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=])
186
183
AC_CACHE_CHECK([dependency style of $depcc],
187
184
[am_cv_$1_dependencies_compiler_type],
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
317
[--enable-dependency-tracking],
318
[do not reject slow dependency extractors])
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='\'
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
329
334
# Generate code to set up dependency tracking. -*- Autoconf -*-
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.
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.
340
343
# _AM_OUTPUT_DEPENDENCY_COMMANDS
341
344
# ------------------------------
342
345
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
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
461
465
# Define the identity of the package.
462
466
dnl Distinguish between old-style and new-style calls.
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,,
476
m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [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
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
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
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
520
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
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
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>
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.
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
564
Aborting the configuration process, to ensure you take notice of the issue.
566
You can download and install GNU coreutils to get an 'rm' implementation
567
that behaves properly: <http://www.gnu.org/software/coreutils/>.
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.
574
AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
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])])
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.
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 "
721
AC_MSG_WARN([`missing' script is too old or missing])
766
AC_MSG_WARN(['missing' script is too old or missing])
725
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
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.
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
744
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
746
[[\\/$]]* | ?:[[\\/]]*) ;;
747
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
751
770
# Helper functions for option handling. -*- Autoconf -*-
753
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
772
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
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.
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_]], [_])])
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])])
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])])
801
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
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.
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
816
[whether $CC understands -c and -o together],
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
825
if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
826
&& test -f conftest2.$ac_objext; then
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"
845
# For backward compatibility.
846
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
848
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
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.
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
862
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
863
(exit $ac_status); }])
784
865
# Check to make sure that the build environment is sane. -*- Autoconf -*-
786
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
787
# Free Software Foundation, Inc.
867
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
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.
795
873
# AM_SANITY_CHECK
796
874
# ---------------
797
875
AC_DEFUN([AM_SANITY_CHECK],
798
876
[AC_MSG_CHECKING([whether build environment is sane])
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.
811
886
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
812
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
887
AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
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
821
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
822
if test "$[*]" = "X"; then
824
set X `ls -t "$srcdir/configure" conftest.file`
827
if test "$[*]" != "X $srcdir/configure conftest.file" \
828
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
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])
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
902
set X `ls -t "$srcdir/configure" conftest.file`
904
if test "$[*]" != "X $srcdir/configure conftest.file" \
905
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
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])
914
if test "$[2]" = conftest.file || test $am_try -eq 2; then
838
921
test "$[2]" = conftest.file
844
927
AC_MSG_ERROR([newly created file is older than distributed files!
845
928
Check your system clock])
931
# If we didn't sleep, we still need to ensure time stamps of config.status and
932
# generated files are strictly newer.
934
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
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
944
AC_MSG_RESULT([done])])
849
# Copyright (C) 2009 Free Software Foundation, Inc.
948
# Copyright (C) 2009-2013 Free Software Foundation, Inc.
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.
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
961
[--enable-silent-rules],
962
[less verbose build output (undo: "make V=1")])
964
[--disable-silent-rules],
965
[verbose build output (undo: "make V=0")])dnl
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]);;
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.
977
AC_CACHE_CHECK([whether $am_make supports nested variables],
978
[am_cv_make_support_nested_variables],
979
[if AS_ECHO([['TRUE=$(BAR$(V))
985
.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
986
am_cv_make_support_nested_variables=yes
988
am_cv_make_support_nested_variables=no
990
if test $am_cv_make_support_nested_variables = yes; then
991
dnl Using '$V' instead of '$(V)' breaks IRIX make.
993
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
995
AM_V=$AM_DEFAULT_VERBOSITY
996
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
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
876
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1008
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
878
1010
# This file is free software; the Free Software Foundation
879
1011
# gives unlimited permission to copy and/or distribute it,
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], :)
901
1033
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
902
1034
AC_SUBST([INSTALL_STRIP_PROGRAM])])
904
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
1036
# Copyright (C) 2006-2013 Free Software Foundation, Inc.
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.
912
1042
# _AM_SUBST_NOTMAKE(VARIABLE)
913
1043
# ---------------------------
914
1044
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
943
1071
# Substitute a variable $(am__untar) that extract such
944
1072
# a tarball read from stdin.
945
1073
# $(am__untar) < result.tar
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}'])
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'
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
963
for _am_tar in tar gnutar gtar;
965
AM_RUN_LOG([$_am_tar --version]) && break
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 -"
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"'
980
am__tar='pax -L -x $1 -w "$$tardir"'
981
am__tar_='pax -L -x $1 -w "$tardir"'
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'
996
# If the value was cached, stop now. We just wanted to have am__tar
998
test -n "${am_cv_prog_tar_$1}" && break
1000
# tar/untar a dummy directory, and stop if the command works
1003
echo GrepMe > conftest.dir/file
1004
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
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
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 -'],
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
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])
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])
1118
[m4_fatal([Unknown tar format])])
1120
AC_MSG_CHECKING([how to create a $1 tar archive])
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}
1126
for _am_tool in $_am_tools; do
1129
for _am_tar in tar gnutar gtar; do
1130
AM_RUN_LOG([$_am_tar --version]) && break
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 -"
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 -'
1145
am__tar='pax -L -x $1 -w "$$tardir"'
1146
am__tar_='pax -L -x $1 -w "$tardir"'
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'
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
1165
# tar/untar a dummy directory, and stop if the command works.
1168
echo GrepMe > conftest.dir/file
1169
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
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
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])])
1015
1182
AC_SUBST([am__tar])
1016
1183
AC_SUBST([am__untar])
1017
1184
]) # _AM_PROG_TAR
2230
2397
AC_MSG_RESULT([$enable_unit_tests])
2231
2398
]) # XORG_ENABLE_UNIT_TESTS
2400
# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto)
2401
# ------------------------------------------------------
2402
# Minimum version: 1.17.0
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"
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.
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.
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
2233
2433
# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
2234
2434
# ----------------------------------------
2235
2435
# Minimum version: 1.13.0
2623
2835
# -Werror=unused-command-line-argument
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])])
2630
xorg_testset_save_CFLAGS="$CFLAGS"
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
2845
AC_REQUIRE([AC_PROG_CC_C99])
2846
define([PREFIX], [C])
2847
define([CACHE_PREFIX], [cc])
2848
define([COMPILER], [$CC])
2851
define([PREFIX], [CXX])
2852
define([CACHE_PREFIX], [cxx])
2853
define([COMPILER], [$CXX])
2857
[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
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]"
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"
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]"
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"
2664
if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
2665
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
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"
2891
if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
2892
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
2895
PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
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])])
2678
CFLAGS="$xorg_testset_save_CFLAGS"
2680
eval supported=$AS_TR_SH($cacheid)
2902
[eval $cacheid=yes],
2903
[eval $cacheid=no])])
2905
PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
2907
eval supported=\$$cacheid
2681
2908
AC_MSG_RESULT([$supported])
2682
2909
if test "$supported" = "yes" ; then
2683
2910
$1="$$1 ]flag["
2708
2935
[SELECTIVE_WERROR=$enableval],
2709
2936
[SELECTIVE_WERROR=yes])
2940
define([PREFIX], [C])
2943
define([PREFIX], [CXX])
2711
2946
# -v is too short to test reliably with XORG_TESTSET_CFLAG
2712
2947
if test "x$SUNCC" = "xyes"; then
2948
[BASE_]PREFIX[FLAGS]="-v"
2950
[BASE_]PREFIX[FLAGS]=""
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])
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])
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])
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])
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.
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
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])
2780
AC_SUBST([BASE_CFLAGS])
3020
AC_SUBST([BASE_]PREFIX[FLAGS])
2781
3021
]) # XORG_COMPILER_FLAGS
2783
3023
# XORG_CWARNFLAGS