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.
587
642
rmdir .tst 2>/dev/null
588
643
AC_SUBST([am__leading_dot])])
590
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
593
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
594
# Free Software Foundation, Inc.
596
# This file is free software; the Free Software Foundation
597
# gives unlimited permission to copy and/or distribute it,
598
# with or without modifications, as long as this notice is preserved.
602
# AM_MAINTAINER_MODE([DEFAULT-MODE])
603
# ----------------------------------
604
# 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
607
# can override the default with the --enable/--disable switch.
608
AC_DEFUN([AM_MAINTAINER_MODE],
609
[m4_case(m4_default([$1], [disable]),
610
[enable], [m4_define([am_maintainer_other], [disable])],
611
[disable], [m4_define([am_maintainer_other], [enable])],
612
[m4_define([am_maintainer_other], [enable])
613
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])
615
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
616
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]))
621
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
622
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
623
MAINT=$MAINTAINER_MODE_TRUE
628
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
630
645
# Check to see how 'make' treats includes. -*- Autoconf -*-
632
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
647
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
634
649
# This file is free software; the Free Software Foundation
635
650
# gives unlimited permission to copy and/or distribute it,
636
651
# with or without modifications, as long as this notice is preserved.
640
653
# AM_MAKE_INCLUDE()
641
654
# -----------------
642
655
# Check to see how make treats includes.
716
725
# Use eval to expand $SHELL
717
if eval "$MISSING --run true"; then
718
am_missing_run="$MISSING --run "
726
if eval "$MISSING --is-lightweight"; then
727
am_missing_run="$MISSING "
721
AC_MSG_WARN([`missing' script is too old or missing])
730
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
734
# Helper functions for option handling. -*- Autoconf -*-
753
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
736
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
755
738
# This file is free software; the Free Software Foundation
756
739
# gives unlimited permission to copy and/or distribute it,
757
740
# with or without modifications, as long as this notice is preserved.
761
742
# _AM_MANGLE_OPTION(NAME)
762
743
# -----------------------
763
744
AC_DEFUN([_AM_MANGLE_OPTION],
764
745
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
766
747
# _AM_SET_OPTION(NAME)
767
# ------------------------------
748
# --------------------
768
749
# Set option NAME. Presently that only means defining a flag for this option.
769
750
AC_DEFUN([_AM_SET_OPTION],
770
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
751
[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
772
753
# _AM_SET_OPTIONS(OPTIONS)
773
# ----------------------------------
754
# ------------------------
774
755
# OPTIONS is a space-separated list of Automake options.
775
756
AC_DEFUN([_AM_SET_OPTIONS],
776
757
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
781
762
AC_DEFUN([_AM_IF_OPTION],
782
763
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
765
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
767
# This file is free software; the Free Software Foundation
768
# gives unlimited permission to copy and/or distribute it,
769
# with or without modifications, as long as this notice is preserved.
773
# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
774
# to automatically call this.
775
AC_DEFUN([_AM_PROG_CC_C_O],
776
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
777
AC_REQUIRE_AUX_FILE([compile])dnl
780
[whether $CC understands -c and -o together],
782
[AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
783
# Make sure it works both with $CC and with simple cc.
784
# Following AC_PROG_CC_C_O, we do the test twice because some
785
# compilers refuse to overwrite an existing .o file with -o,
786
# though they will create one.
787
am_cv_prog_cc_c_o=yes
789
if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
790
&& test -f conftest2.$ac_objext; then
799
if test "$am_cv_prog_cc_c_o" != yes; then
800
# Losing compiler, so override with the script.
801
# FIXME: It is wrong to rewrite CC.
802
# But if we don't then we get into trouble of one sort or another.
803
# A longer-term fix would be to have automake use am__CC in this case,
804
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
805
CC="$am_aux_dir/compile $CC"
809
# For backward compatibility.
810
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
812
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
814
# This file is free software; the Free Software Foundation
815
# gives unlimited permission to copy and/or distribute it,
816
# with or without modifications, as long as this notice is preserved.
818
# AM_RUN_LOG(COMMAND)
819
# -------------------
820
# Run COMMAND, save the exit status in ac_status, and log it.
821
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
822
AC_DEFUN([AM_RUN_LOG],
823
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
824
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
826
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
827
(exit $ac_status); }])
784
829
# 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.
831
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
789
833
# This file is free software; the Free Software Foundation
790
834
# gives unlimited permission to copy and/or distribute it,
791
835
# with or without modifications, as long as this notice is preserved.
795
837
# AM_SANITY_CHECK
796
838
# ---------------
797
839
AC_DEFUN([AM_SANITY_CHECK],
798
840
[AC_MSG_CHECKING([whether build environment is sane])
801
echo timestamp > conftest.file
802
841
# Reject unsafe characters in $srcdir or the absolute working directory
803
842
# name. Accept space and tab only in the latter.
844
891
AC_MSG_ERROR([newly created file is older than distributed files!
845
892
Check your system clock])
895
# If we didn't sleep, we still need to ensure time stamps of config.status and
896
# generated files are strictly newer.
898
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
902
AC_CONFIG_COMMANDS_PRE(
903
[AC_MSG_CHECKING([that generated files are newer than configure])
904
if test -n "$am_sleep_pid"; then
905
# Hide warnings about reused PIDs.
906
wait $am_sleep_pid 2>/dev/null
908
AC_MSG_RESULT([done])])
849
# Copyright (C) 2009 Free Software Foundation, Inc.
912
# Copyright (C) 2009-2013 Free Software Foundation, Inc.
851
914
# This file is free software; the Free Software Foundation
852
915
# gives unlimited permission to copy and/or distribute it,
853
916
# with or without modifications, as long as this notice is preserved.
857
918
# AM_SILENT_RULES([DEFAULT])
858
919
# --------------------------
859
920
# Enable less verbose build rules; with the default set to DEFAULT
860
# (`yes' being less verbose, `no' or empty being verbose).
921
# ("yes" being less verbose, "no" or empty being verbose).
861
922
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]);;
923
[AC_ARG_ENABLE([silent-rules], [dnl
925
[--enable-silent-rules],
926
[less verbose build output (undo: "make V=1")])
928
[--disable-silent-rules],
929
[verbose build output (undo: "make V=0")])dnl
931
case $enable_silent_rules in @%:@ (((
932
yes) AM_DEFAULT_VERBOSITY=0;;
933
no) AM_DEFAULT_VERBOSITY=1;;
934
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
937
dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
938
dnl do not support nested variable expansions.
939
dnl See automake bug#9928 and bug#10237.
941
AC_CACHE_CHECK([whether $am_make supports nested variables],
942
[am_cv_make_support_nested_variables],
943
[if AS_ECHO([['TRUE=$(BAR$(V))
949
.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
950
am_cv_make_support_nested_variables=yes
952
am_cv_make_support_nested_variables=no
954
if test $am_cv_make_support_nested_variables = yes; then
955
dnl Using '$V' instead of '$(V)' breaks IRIX make.
957
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
959
AM_V=$AM_DEFAULT_VERBOSITY
960
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
963
AM_SUBST_NOTMAKE([AM_V])dnl
964
AC_SUBST([AM_DEFAULT_V])dnl
965
AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
870
966
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
872
968
AC_SUBST([AM_BACKSLASH])dnl
873
969
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
876
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
972
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
878
974
# This file is free software; the Free Software Foundation
879
975
# gives unlimited permission to copy and/or distribute it,
943
1035
# Substitute a variable $(am__untar) that extract such
944
1036
# a tarball read from stdin.
945
1037
# $(am__untar) < result.tar
946
1039
AC_DEFUN([_AM_PROG_TAR],
947
[# Always define AMTAR for backward compatibility.
948
AM_MISSING_PROG([AMTAR], [tar])
1040
[# Always define AMTAR for backward compatibility. Yes, it's still used
1041
# in the wild :-( We should find a proper way to deprecate it ...
1042
AC_SUBST([AMTAR], ['$${TAR-tar}'])
1044
# We'll loop over all known methods to create a tar archive until one works.
1045
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
949
1047
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])])
1048
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1052
[# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1053
# There is notably a 21 bits limit for the UID and the GID. In fact,
1054
# the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1056
am_max_uid=2097151 # 2^21 - 1
1057
am_max_gid=$am_max_uid
1058
# The $UID and $GID variables are not portable, so we need to resort
1059
# to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1060
# below are definitely unexpected, so allow the users to see them
1061
# (that is, avoid stderr redirection).
1062
am_uid=`id -u || echo unknown`
1063
am_gid=`id -g || echo unknown`
1064
AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1065
if test $am_uid -le $am_max_uid; then
1066
AC_MSG_RESULT([yes])
1071
AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1072
if test $am_gid -le $am_max_gid; then
1073
AC_MSG_RESULT([yes])
1082
[m4_fatal([Unknown tar format])])
1084
AC_MSG_CHECKING([how to create a $1 tar archive])
1086
# Go ahead even if we have the value already cached. We do so because we
1087
# need to set the values for the 'am__tar' and 'am__untar' variables.
1088
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1090
for _am_tool in $_am_tools; do
1093
for _am_tar in tar gnutar gtar; do
1094
AM_RUN_LOG([$_am_tar --version]) && break
1096
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1097
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1098
am__untar="$_am_tar -xf -"
1101
# Must skip GNU tar: if it does not support --format= it doesn't create
1102
# ustar tarball either.
1103
(tar --version) >/dev/null 2>&1 && continue
1104
am__tar='tar chf - "$$tardir"'
1105
am__tar_='tar chf - "$tardir"'
1106
am__untar='tar xf -'
1109
am__tar='pax -L -x $1 -w "$$tardir"'
1110
am__tar_='pax -L -x $1 -w "$tardir"'
1114
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1115
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1116
am__untar='cpio -i -H $1 -d'
1125
# If the value was cached, stop now. We just wanted to have am__tar
1126
# and am__untar set.
1127
test -n "${am_cv_prog_tar_$1}" && break
1129
# tar/untar a dummy directory, and stop if the command works.
1132
echo GrepMe > conftest.dir/file
1133
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1135
if test -s conftest.tar; then
1136
AM_RUN_LOG([$am__untar <conftest.tar])
1137
AM_RUN_LOG([cat conftest.dir/file])
1138
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1143
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1144
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1015
1146
AC_SUBST([am__tar])
1016
1147
AC_SUBST([am__untar])
1017
1148
]) # _AM_PROG_TAR
1019
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1021
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1023
# This program is free software; you can redistribute it and/or modify
1024
# it under the terms of the GNU General Public License as published by
1025
# the Free Software Foundation; either version 2 of the License, or
1026
# (at your option) any later version.
1028
# This program is distributed in the hope that it will be useful, but
1029
# WITHOUT ANY WARRANTY; without even the implied warranty of
1030
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1031
# General Public License for more details.
1033
# You should have received a copy of the GNU General Public License
1034
# along with this program; if not, write to the Free Software
1035
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1037
# As a special exception to the GNU General Public License, if you
1038
# distribute this file as part of a program that contains a
1039
# configuration script generated by Autoconf, you may include it under
1040
# the same distribution terms that you use for the rest of that program.
1042
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1043
# ----------------------------------
1044
AC_DEFUN([PKG_PROG_PKG_CONFIG],
1045
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1046
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
1047
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
1048
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1049
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1051
if test -n "$PKG_CONFIG"; then
1052
_pkg_min_version=m4_default([$1], [0.9.0])
1053
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1054
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1055
AC_MSG_RESULT([yes])
1062
])# PKG_PROG_PKG_CONFIG
1064
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1066
# Check to see whether a particular set of modules exists. Similar
1067
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1070
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
1071
# this or PKG_CHECK_MODULES is called, or make sure to call
1072
# PKG_CHECK_EXISTS manually
1073
# --------------------------------------------------------------
1074
AC_DEFUN([PKG_CHECK_EXISTS],
1075
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1076
if test -n "$PKG_CONFIG" && \
1077
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1078
m4_ifval([$2], [$2], [:])
1079
m4_ifvaln([$3], [else
1084
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1085
# ---------------------------------------------
1086
m4_define([_PKG_CONFIG],
1087
[if test -n "$$1"; then
1089
elif test -n "$PKG_CONFIG"; then
1090
PKG_CHECK_EXISTS([$3],
1091
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
1098
# _PKG_SHORT_ERRORS_SUPPORTED
1099
# -----------------------------
1100
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1101
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1102
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1103
_pkg_short_errors_supported=yes
1105
_pkg_short_errors_supported=no
1107
])# _PKG_SHORT_ERRORS_SUPPORTED
1110
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1111
# [ACTION-IF-NOT-FOUND])
1114
# Note that if there is a possibility the first call to
1115
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1116
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1119
# --------------------------------------------------------------
1120
AC_DEFUN([PKG_CHECK_MODULES],
1121
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1122
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1123
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1126
AC_MSG_CHECKING([for $1])
1128
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1129
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1131
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1132
and $1[]_LIBS to avoid the need to call pkg-config.
1133
See the pkg-config man page for more details.])
1135
if test $pkg_failed = yes; then
1136
_PKG_SHORT_ERRORS_SUPPORTED
1137
if test $_pkg_short_errors_supported = yes; then
1138
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
1140
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
1142
# Put the nasty error message in config.log where it belongs
1143
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1145
ifelse([$4], , [AC_MSG_ERROR(dnl
1146
[Package requirements ($2) were not met:
1150
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1151
installed software in a non-standard prefix.
1155
[AC_MSG_RESULT([no])
1157
elif test $pkg_failed = untried; then
1158
ifelse([$4], , [AC_MSG_FAILURE(dnl
1159
[The pkg-config script could not be found or is too old. Make sure it
1160
is in your PATH or set the PKG_CONFIG environment variable to the full
1165
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
1168
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1169
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1170
AC_MSG_RESULT([yes])
1171
ifelse([$3], , :, [$3])
1173
])# PKG_CHECK_MODULES
1175
1150
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1177
1152
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1178
# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
1153
# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1180
1155
# Written by Gordon Matzigkeit, 1996
1182
1157
# This file is free software; the Free Software Foundation gives
9599
9734
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
9600
9735
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
9737
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
9739
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9741
# This program is free software; you can redistribute it and/or modify
9742
# it under the terms of the GNU General Public License as published by
9743
# the Free Software Foundation; either version 2 of the License, or
9744
# (at your option) any later version.
9746
# This program is distributed in the hope that it will be useful, but
9747
# WITHOUT ANY WARRANTY; without even the implied warranty of
9748
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9749
# General Public License for more details.
9751
# You should have received a copy of the GNU General Public License
9752
# along with this program; if not, write to the Free Software
9753
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9755
# As a special exception to the GNU General Public License, if you
9756
# distribute this file as part of a program that contains a
9757
# configuration script generated by Autoconf, you may include it under
9758
# the same distribution terms that you use for the rest of that program.
9760
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
9761
# ----------------------------------
9762
AC_DEFUN([PKG_PROG_PKG_CONFIG],
9763
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9764
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
9765
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
9766
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9767
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9769
if test -n "$PKG_CONFIG"; then
9770
_pkg_min_version=m4_default([$1], [0.9.0])
9771
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9772
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9773
AC_MSG_RESULT([yes])
9780
])# PKG_PROG_PKG_CONFIG
9782
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9784
# Check to see whether a particular set of modules exists. Similar
9785
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
9788
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
9789
# this or PKG_CHECK_MODULES is called, or make sure to call
9790
# PKG_CHECK_EXISTS manually
9791
# --------------------------------------------------------------
9792
AC_DEFUN([PKG_CHECK_EXISTS],
9793
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9794
if test -n "$PKG_CONFIG" && \
9795
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9796
m4_ifval([$2], [$2], [:])
9797
m4_ifvaln([$3], [else
9802
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9803
# ---------------------------------------------
9804
m4_define([_PKG_CONFIG],
9805
[if test -n "$$1"; then
9807
elif test -n "$PKG_CONFIG"; then
9808
PKG_CHECK_EXISTS([$3],
9809
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
9816
# _PKG_SHORT_ERRORS_SUPPORTED
9817
# -----------------------------
9818
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9819
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9820
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9821
_pkg_short_errors_supported=yes
9823
_pkg_short_errors_supported=no
9825
])# _PKG_SHORT_ERRORS_SUPPORTED
9828
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9829
# [ACTION-IF-NOT-FOUND])
9832
# Note that if there is a possibility the first call to
9833
# PKG_CHECK_MODULES might not happen, you should be sure to include an
9834
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9837
# --------------------------------------------------------------
9838
AC_DEFUN([PKG_CHECK_MODULES],
9839
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9840
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9841
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9844
AC_MSG_CHECKING([for $1])
9846
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9847
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
9849
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9850
and $1[]_LIBS to avoid the need to call pkg-config.
9851
See the pkg-config man page for more details.])
9853
if test $pkg_failed = yes; then
9854
_PKG_SHORT_ERRORS_SUPPORTED
9855
if test $_pkg_short_errors_supported = yes; then
9856
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
9858
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
9860
# Put the nasty error message in config.log where it belongs
9861
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9863
ifelse([$4], , [AC_MSG_ERROR(dnl
9864
[Package requirements ($2) were not met:
9868
Consider adjusting the PKG_CONFIG_PATH environment variable if you
9869
installed software in a non-standard prefix.
9873
[AC_MSG_RESULT([no])
9875
elif test $pkg_failed = untried; then
9876
ifelse([$4], , [AC_MSG_FAILURE(dnl
9877
[The pkg-config script could not be found or is too old. Make sure it
9878
is in your PATH or set the PKG_CONFIG environment variable to the full
9883
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
9886
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9887
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9888
AC_MSG_RESULT([yes])
9889
ifelse([$3], , :, [$3])
9891
])# PKG_CHECK_MODULES
9602
9893
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
9604
9895
dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
9606
9897
dnl Permission is hereby granted, free of charge, to any person obtaining a
9607
9898
dnl copy of this software and associated documentation files (the "Software"),
9608
9899
dnl to deal in the Software without restriction, including without limitation
11050
11428
# -Werror=unused-command-line-argument
11052
11430
AC_DEFUN([XORG_TESTSET_CFLAG], [
11053
AC_REQUIRE([AC_PROG_CC_C99])
11054
11431
m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
11055
11432
m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
11057
xorg_testset_save_CFLAGS="$CFLAGS"
11059
if test "x$xorg_testset_unknown_warning_option" = "x" ; then
11060
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
11061
AC_CACHE_CHECK([if $CC supports -Werror=unknown-warning-option],
11062
xorg_cv_cc_flag_unknown_warning_option,
11434
AC_LANG_COMPILER_REQUIRE
11438
AC_REQUIRE([AC_PROG_CC_C99])
11439
define([PREFIX], [C])
11440
define([CACHE_PREFIX], [cc])
11441
define([COMPILER], [$CC])
11444
define([PREFIX], [CXX])
11445
define([CACHE_PREFIX], [cxx])
11446
define([COMPILER], [$CXX])
11450
[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
11452
if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then
11453
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
11454
AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option],
11455
[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option],
11063
11456
AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
11064
[xorg_cv_cc_flag_unknown_warning_option=yes],
11065
[xorg_cv_cc_flag_unknown_warning_option=no]))
11066
xorg_testset_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
11067
CFLAGS="$xorg_testset_save_CFLAGS"
11457
[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes],
11458
[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no]))
11459
[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option]
11460
PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
11070
if test "x$xorg_testset_unused_command_line_argument" = "x" ; then
11071
if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
11072
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
11463
if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then
11464
if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then
11465
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
11074
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
11075
AC_CACHE_CHECK([if $CC supports -Werror=unused-command-line-argument],
11076
xorg_cv_cc_flag_unused_command_line_argument,
11467
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
11468
AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument],
11469
[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument],
11077
11470
AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
11078
[xorg_cv_cc_flag_unused_command_line_argument=yes],
11079
[xorg_cv_cc_flag_unused_command_line_argument=no]))
11080
xorg_testset_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
11081
CFLAGS="$xorg_testset_save_CFLAGS"
11471
[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes],
11472
[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no]))
11473
[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument]
11474
PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
11085
11478
m4_foreach([flag], m4_cdr($@), [
11086
11479
if test $found = "no" ; then
11087
if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
11088
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
11091
if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
11092
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
11095
CFLAGS="$CFLAGS ]flag["
11480
if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then
11481
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
11484
if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
11485
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
11488
PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
11097
11490
dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
11098
AC_MSG_CHECKING([if $CC supports ]flag[])
11099
cacheid=`AS_ECHO([xorg_cv_cc_flag_]flag[])`
11100
AC_CACHE_VAL(AS_TR_SH($cacheid),
11491
AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[])
11492
cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
11493
AC_CACHE_VAL($cacheid,
11101
11494
[AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
11102
[eval AS_TR_SH($cacheid)=yes],
11103
[eval AS_TR_SH($cacheid)=no])])
11105
CFLAGS="$xorg_testset_save_CFLAGS"
11107
eval supported=$AS_TR_SH($cacheid)
11495
[eval $cacheid=yes],
11496
[eval $cacheid=no])])
11498
PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
11500
eval supported=\$$cacheid
11108
11501
AC_MSG_RESULT([$supported])
11109
11502
if test "$supported" = "yes" ; then
11110
11503
$1="$$1 ]flag["
11135
11528
[SELECTIVE_WERROR=$enableval],
11136
11529
[SELECTIVE_WERROR=yes])
11533
define([PREFIX], [C])
11536
define([PREFIX], [CXX])
11138
11539
# -v is too short to test reliably with XORG_TESTSET_CFLAG
11139
11540
if test "x$SUNCC" = "xyes"; then
11541
[BASE_]PREFIX[FLAGS]="-v"
11543
[BASE_]PREFIX[FLAGS]=""
11145
11546
# This chunk of warnings were those that existed in the legacy CWARNFLAGS
11146
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wall])
11147
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wpointer-arith])
11148
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wstrict-prototypes])
11149
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-prototypes])
11150
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-declarations])
11151
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wnested-externs])
11152
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wbad-function-cast])
11153
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wformat=2], [-Wformat])
11154
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wold-style-definition])
11155
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wdeclaration-after-statement])
11547
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
11548
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
11549
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
11550
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
11554
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
11555
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
11556
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
11557
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
11558
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd])
11559
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
11157
11563
# This chunk adds additional warnings that could catch undesired effects.
11158
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wunused])
11159
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wuninitialized])
11160
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wshadow])
11161
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wcast-qual])
11162
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-noreturn])
11163
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-format-attribute])
11164
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wredundant-decls])
11564
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
11565
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
11566
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
11567
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
11568
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
11569
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
11570
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
11166
11572
# These are currently disabled because they are noisy. They will be enabled
11167
11573
# in the future once the codebase is sufficiently modernized to silence
11168
11574
# them. For now, I don't want them to drown out the other warnings.
11169
# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wlogical-op])
11170
# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wparentheses])
11171
# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wcast-align])
11575
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
11576
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
11577
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
11173
11579
# Turn some warnings into errors, so we don't accidently get successful builds
11174
11580
# when there are problems that should be fixed.
11176
11582
if test "x$SELECTIVE_WERROR" = "xyes" ; then
11177
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
11178
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=nonnull])
11179
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=init-self])
11180
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=main])
11181
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=missing-braces])
11182
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=sequence-point])
11183
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
11184
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=trigraphs])
11185
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=array-bounds])
11186
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=write-strings])
11187
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=address])
11188
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
11189
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
11583
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
11584
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
11585
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
11586
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
11587
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
11588
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
11589
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
11590
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
11591
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
11592
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
11593
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
11594
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
11595
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
11191
11597
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])
11192
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wimplicit])
11193
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wnonnull])
11194
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Winit-self])
11195
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmain])
11196
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-braces])
11197
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wsequence-point])
11198
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wreturn-type])
11199
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wtrigraphs])
11200
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Warray-bounds])
11201
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wwrite-strings])
11202
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Waddress])
11203
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wint-to-pointer-cast])
11204
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wpointer-to-int-cast])
11598
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
11599
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
11600
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
11601
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
11602
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
11603
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
11604
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
11605
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
11606
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
11607
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
11608
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
11609
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
11610
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
11207
AC_SUBST([BASE_CFLAGS])
11613
AC_SUBST([BASE_]PREFIX[FLAGS])
11208
11614
]) # XORG_COMPILER_FLAGS
11210
11616
# XORG_CWARNFLAGS