over the same-named automake-provided macro, as defined in file
'/usr/local/share/aclocal-1.14/vala.m4'.
-* Obsolete features:
+* Obsolete and obsolescent features:
- Support for the long-obsolete $(INCLUDES) variable has been finally
removed, in favour of the modern equivalent $(AM_CPPFLAGS).
+ - Use of the special makefile variable 'ACLOCAL_AMFLAGS' is deprecated.
+ To specify locations of extra m4 files, the 'AC_CONFIG_MACRO_DIR' or
+ 'AC_CONFIG_MACRO_DIRS' (the latter introduced with autoconf 2.70)
+ should be used instead. And use of the '--install' aclocal option in
+ 'ACLOCAL_AMFLAGS' has proved to be a bad idea anyway -- see automake
+ bug#9037.
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
New in 1.13:
# Catch some obsolete variables.
reject_var 'INCLUDES', "'INCLUDES' is the obsolete name for " .
"'AM_CPPFLAGS' (or '*_CPPFLAGS')";
+ if (my $amflags = var ('ACLOCAL_AMFLAGS'))
+ {
+ msg_var 'obsolete', $amflags,
+ "'ACLOCAL_AMFLAGS' is deprecated; use 'AC_CONFIG_MACRO_DIRS'"
+ . " in configure.ac instead";
+ }
# Must do this after reading .am file.
define_variable ('subdir', $relative_dir, INTERNAL);
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check that the obsolescent idiom of setting $(ACLOCAL_AMFLAGS) in
-# Makefile.am still works. Remove this test once support for this
-# obsolescent idiom is removed.
+# Makefile.am is warned against, but still works. Remove this test
+# once support for this obsolescent idiom is removed.
. test-init.sh
cat output
grep 'found macro' output && exit 1 # Sanity check.
$AUTOCONF
-$AUTOMAKE
+
+for opts in '' '-Wnone -Wobsolete'; do
+ AUTOMAKE_fails $opts
+ grep "Makefile\.am:.*'ACLOCAL_AMFLAGS' is deprecated" stderr
+ grep "Makefile\.am:.*'AC_CONFIG_MACRO_DIRS'.*configure\.ac.*instead" stderr
+done
+
+echo AUTOMAKE_OPTIONS = -Wall -Wno-obsolete >> Makefile.am
+cat Makefile.am # For debugging.
+$AUTOMAKE -Werror
./configure
test -f foo
. test-init.sh
-cat >>configure.ac <<EOF
+cat > configure.ac <<EOF
+AC_INIT([$me], [1.3])
+AM_INIT_AUTOMAKE([-Wno-obsolete])
+AC_CONFIG_FILES([Makefile])
FOO
AC_OUTPUT
EOF
cat >>Makefile.am<<\EOF
ACLOCAL_AMFLAGS = -I defs
+AUTOMAKE_OPTIONS = -Wno-obsolete
testdist1: distdir
test -f $(distdir)/acinclude.m4
test -f $(distdir)/a.m4
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+AUTOMAKE_OPTIONS = -Wno-obsolete
+
distcheck-hook:
@fatal () { echo "$@: $$*" >&2; exit 1; }; \
$(am__cd) $(distdir) && chmod u+w . && mkdir _m4 \
. test-init.sh
cat >> configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
m4_pattern_forbid([^MY_])
MY_FOOBAR || exit 1
MY_ZARDOZ || exit 1
echo 'AC_DEFUN([MY_FOOBAR], [:])' > m4/foobar.m4
echo 'AC_DEFUN([MY_ZARDOZ], [:])' > m4/zardoz.m4
-echo 'ACLOCAL_AMFLAGS = -I m4' > Makefile.am
+: > Makefile.am
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
echo : >> get.sh
# The 'gettextize' and 'autopoint' scripts will look into Makefile.am.
-echo ACLOCAL_AMFLAGS = -I m4 > Makefile.am
+echo AUTOMAKE_OPTIONS = -Wno-obsolete > Makefile.am
+echo ACLOCAL_AMFLAGS = -I m4 >> Makefile.am
# Prefer autopoint to gettextize, since the more modern versions of the
# latter might unconditionally require user interaction to complete;
echo "# Automatically generated by $me." > get.sh
echo : >> get.sh
-# The 'libtoolize' script will look into Makefile.am.
-echo ACLOCAL_AMFLAGS = -I m4 > Makefile.am
+echo 'AC_CONFIG_MACRO_DIR([m4])' >> configure.ac
if libtoolize --copy --install && test -f m4/libtool.m4; then
echo "ACLOCAL_PATH='$(pwd)/m4':\$ACLOCAL_PATH" >> get.sh
mkdir m4
echo AC_PROG_LIBTOOL >> configure.ac
# See below for an explanation about the use the of '-Wno-syntax'.
- if $ACLOCAL -Wno-syntax -I m4 --install && test -f m4/libtool.m4; then
+ if $ACLOCAL -Wno-syntax --install && test -f m4/libtool.m4; then
: # Libtool macros already accessible by default.
else
echo "skip_all_ \"couldn't find or get libtool macros\"" >> get.sh
cat >> configure.ac <<'END'
FOO_MACRO
AC_OUTPUT
+dnl Deliberately put this late, for better coverage.
+AC_CONFIG_MACRO_DIR([m4])
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
.PHONY: test
test:
test '$(the_answer)' -eq 42
AC_DEFUN([BAR_MACRO], [$macro_value])
END
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
cat >> configure.ac <<'END'
AC_PROG_CC
+AC_CONFIG_MACRO_DIRS([m4])
MY_MACROS
AC_OUTPUT
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
noinst_PROGRAMS = foo
foo_SOURCES = foo.c
BUILT_SOURCES = foo.h
typedef int checkfoo[1 - 2 * (foo != 42)];
END
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
. test-init.sh
cat >> configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([.])
AC_CONFIG_HEADERS([config.h])
AC_PROG_CC
MY_MACROS
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I .
noinst_PROGRAMS = foo
foo_SOURCES = foo.c
BUILT_SOURCES = $(STDIO_H)
int main () { return 0; }
END
-$ACLOCAL -I .
+$ACLOCAL
$AUTOHEADER
$AUTOMAKE
$AUTOCONF
. test-init.sh
cat >> configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([.])
AC_CONFIG_HEADERS([config.h])
AC_PROG_CC
MY_MACROS
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I .
noinst_PROGRAMS = foo
foo_SOURCES = foo.c
BUILT_SOURCES = $(STDIO_H)
int main () { return 0; }
END
-$ACLOCAL -I .
+$ACLOCAL
$AUTOHEADER
$AUTOMAKE
$AUTOCONF
cat >> configure.ac <<'END'
MY_MACRO
+AC_CONFIG_MACRO_DIRS([d1])
+AC_CONFIG_MACRO_DIRS([d2 d3])
AC_OUTPUT
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I d1 -I d2 -I d3
.PHONY: test
test:
test '$(the_answer)' -eq 42
AC_DEFUN([FOO], [the_answer=42; AC_SUBST([the_answer])])
END
-$ACLOCAL -I d1
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
. test-init.sh
cat >> configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
MY_MACRO
AC_OUTPUT
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
.PHONY: test
test:
test '$(the_answer)' -eq 42
AC_DEFUN([FOO], [the_answer=42; AC_SUBST([the_answer])])
END
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
. test-init.sh
cat >> configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
MY_MACRO
AC_OUTPUT
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
.PHONY: test
test:
test '$(the_answer)' -eq 42
AC_DEFUN([FOO_MACRO], [the_answer=42; AC_SUBST([the_answer])])
END
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
. test-init.sh
cat >> configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
MY_MACRO
AC_OUTPUT
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
.PHONY: test
test:
test '$(the_answer)' -eq 42
AC_SUBST([the_answer])])
END
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE