* autoheader.sh: Likewise.
* acgeneral.m4 (_AC_WARNING_IFELSE): Adjust.
+2000-07-28 Akim Demaille <akim@epita.fr>
+
+ * autoconf.sh (--warnings): Catch `no-category', not `nocategory'.
+ * autoheader.sh: Likewise.
+ * acgeneral.m4 (_AC_WARNING_IFELSE): Adjust.
+
2000-07-28 Akim Demaille <akim@epita.fr>
* doc/autoconf.texi (Installation Directory Variables): New
# --------------------------------------------------------------
# Implementation of the loop described above.
define([_AC_WARNING_IFELSE],
-[ifelse([$4], [$1], [$2],
- [$4], [all], [$2],
- [$4], [], [$3],
- [$4], [none], [$3],
- [$4], [no$1], [$3],
+[ifelse([$4], [$1], [$2],
+ [$4], [all], [$2],
+ [$4], [], [$3],
+ [$4], [none], [$3],
+ [$4], [no-$1], [$3],
[$0([$1], [$2], [$3], m4_shiftn(4, $@))])])
-W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax]
Warning categories include:
- \`cross' cross compilation issues
- \`obsolete' obsolete constructs
- \`syntax' dubious syntactic constructs
- \`all' all the warnings
- \`noCATEGORY' turn off the warnings on CATEGORY
- \`none' turn off all the warnings
- \`error' warnings are error
+ \`cross' cross compilation issues
+ \`obsolete' obsolete constructs
+ \`syntax' dubious syntactic constructs
+ \`all' all the warnings
+ \`no-CATEGORY' turn off the warnings on CATEGORY
+ \`none' turn off all the warnings
+ \`error' warnings are error
The environment variable \`WARNINGS' is honored.
shift
warnings=$warnings,$1
shift ;;
- --warnings=* )
- warnings=$warnings,$optarg
- shift ;;
- -W* ) # People are used to -Wall, -Werror etc.
+ --warnings=* | -W* )
warnings=$warnings,$optarg
shift ;;
-W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax]
Warning categories include:
- \`cross' cross compilation issues
- \`obsolete' obsolete constructs
- \`syntax' dubious syntactic constructs
- \`all' all the warnings
- \`noCATEGORY' turn off the warnings on CATEGORY
- \`none' turn off all the warnings
- \`error' warnings are error
+ \`cross' cross compilation issues
+ \`obsolete' obsolete constructs
+ \`syntax' dubious syntactic constructs
+ \`all' all the warnings
+ \`no-CATEGORY' turn off the warnings on CATEGORY
+ \`none' turn off all the warnings
+ \`error' warnings are error
The environment variable \`WARNINGS' is honored.
shift
warnings=$warnings,$1
shift ;;
- --warnings=* )
- warnings=$warnings,$optarg
- shift ;;
- -W* ) # People are used to -Wall, -Werror etc.
+ --warnings=* | -W* )
warnings=$warnings,$optarg
shift ;;
# Parse command line.
while test $# -gt 0 ; do
- optarg=`expr "$1" : '-[^=]*=\(.*\)'`
+ optarg=`expr "$1" : '--[^=]*=\(.*\)' \| \
+ "$1" : '-.\(.*\)'`
case $1 in
--version | --vers* | -V )
echo "$version" ; exit 0 ;;
--warnings | -W )
test $# = 1 && eval "$exit_missing_arg"
shift
- warnings="$warnings "`echo $1 | sed -e 's/,/ /g'`
+ warnings=$warnings,$1
shift ;;
--warnings=* | -W*)
- warnings="$warnings "`echo "$optarg" | sed -e 's/,/ /g'`
+ warnings=$warnings,$optarg
shift ;;
-- ) # Stop option processing
esac
done
-# Decode `$warnings'.
-for i in :$warnings
+# The warnings are the concatenation of 1. application's defaults
+# (here, none), 2. $WARNINGS, $3 command line options, in that order.
+_ac_warnings=
+for warning in `IFS=,; echo $WARNINGS,$warnings | tr 'A-Z' 'a-z'`
do
- test "$i" = : && continue
- eval "warning_$i=:"
+ case $warning in
+ '') continue;;
+ no-*) eval warning_`expr x$warning : 'xno-\(.*\)'`=false;;
+ *) eval warning_$warning=:;;
+ esac
done
# Trap on 0 to stop playing with `rm'.
# Parse command line.
while test $# -gt 0 ; do
- optarg=`expr "$1" : '-[^=]*=\(.*\)'`
+ optarg=`expr "$1" : '--[^=]*=\(.*\)' \| \
+ "$1" : '-.\(.*\)'`
case $1 in
--version | --vers* | -V )
echo "$version" ; exit 0 ;;
--warnings | -W )
test $# = 1 && eval "$exit_missing_arg"
shift
- warnings="$warnings "`echo $1 | sed -e 's/,/ /g'`
+ warnings=$warnings,$1
shift ;;
--warnings=* | -W*)
- warnings="$warnings "`echo "$optarg" | sed -e 's/,/ /g'`
+ warnings=$warnings,$optarg
shift ;;
-- ) # Stop option processing
esac
done
-# Decode `$warnings'.
-for i in :$warnings
+# The warnings are the concatenation of 1. application's defaults
+# (here, none), 2. $WARNINGS, $3 command line options, in that order.
+_ac_warnings=
+for warning in `IFS=,; echo $WARNINGS,$warnings | tr 'A-Z' 'a-z'`
do
- test "$i" = : && continue
- eval "warning_$i=:"
+ case $warning in
+ '') continue;;
+ no-*) eval warning_`expr x$warning : 'xno-\(.*\)'`=false;;
+ *) eval warning_$warning=:;;
+ esac
done
# Trap on 0 to stop playing with `rm'.
-W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax]
Warning categories include:
- \`cross' cross compilation issues
- \`obsolete' obsolete constructs
- \`syntax' dubious syntactic constructs
- \`all' all the warnings
- \`noCATEGORY' turn off the warnings on CATEGORY
- \`none' turn off all the warnings
- \`error' warnings are error
+ \`cross' cross compilation issues
+ \`obsolete' obsolete constructs
+ \`syntax' dubious syntactic constructs
+ \`all' all the warnings
+ \`no-CATEGORY' turn off the warnings on CATEGORY
+ \`none' turn off all the warnings
+ \`error' warnings are error
The environment variable \`WARNINGS' is honored.
shift
warnings=$warnings,$1
shift ;;
- --warnings=* )
- warnings=$warnings,$optarg
- shift ;;
- -W* ) # People are used to -Wall, -Werror etc.
+ --warnings=* | -W* )
warnings=$warnings,$optarg
shift ;;
# Parse command line.
while test $# -gt 0 ; do
- optarg=`expr "$1" : '-[^=]*=\(.*\)'`
+ optarg=`expr "$1" : '--[^=]*=\(.*\)' \| \
+ "$1" : '-.\(.*\)'`
case $1 in
--version | --vers* | -V )
echo "$version" ; exit 0 ;;
--warnings | -W )
test $# = 1 && eval "$exit_missing_arg"
shift
- warnings="$warnings "`echo $1 | sed -e 's/,/ /g'`
+ warnings=$warnings,$1
shift ;;
--warnings=* | -W*)
- warnings="$warnings "`echo "$optarg" | sed -e 's/,/ /g'`
+ warnings=$warnings,$optarg
shift ;;
-- ) # Stop option processing
esac
done
-# Decode `$warnings'.
-for i in :$warnings
+# The warnings are the concatenation of 1. application's defaults
+# (here, none), 2. $WARNINGS, $3 command line options, in that order.
+_ac_warnings=
+for warning in `IFS=,; echo $WARNINGS,$warnings | tr 'A-Z' 'a-z'`
do
- test "$i" = : && continue
- eval "warning_$i=:"
+ case $warning in
+ '') continue;;
+ no-*) eval warning_`expr x$warning : 'xno-\(.*\)'`=false;;
+ *) eval warning_$warning=:;;
+ esac
done
# Trap on 0 to stop playing with `rm'.
@item error
treats warnings as errors
-@item no@var{category}
+@item no-@var{category}
disable warnings falling into @var{category}
@end table
@item error
treats warnings as errors
-@item no@var{category}
+@item no-@var{category}
disable warnings falling into @var{category}
@end table
# --------------------------------------------------------------
# Implementation of the loop described above.
define([_AC_WARNING_IFELSE],
-[ifelse([$4], [$1], [$2],
- [$4], [all], [$2],
- [$4], [], [$3],
- [$4], [none], [$3],
- [$4], [no$1], [$3],
+[ifelse([$4], [$1], [$2],
+ [$4], [all], [$2],
+ [$4], [], [$3],
+ [$4], [none], [$3],
+ [$4], [no-$1], [$3],
[$0([$1], [$2], [$3], m4_shiftn(4, $@))])])
`all'
all the warnings
.TP
-`noCATEGORY'
+`no-CATEGORY'
turn off the warnings on CATEGORY
.TP
`none'