AC_CHECK_LIB([readline], [readline]) without an ACTION-IF-FOUND
results in the definition of the HAVE_LIBREADLINE C preprocessor
macro and the addition of -lreadline to LIBS, not a configure
script environment variable have_readline.
So this repeats what the default ACTION-IF-FOUND does (add
-lreadline to LIBS, AC_DEFINE the HAVE_LIBREADLINE macro),
and in addition defines the have_libreadline variable as
yes for later use inside configure.ac.
As our src/config.c defines a "yywrap" function, there
is no need for AC_PROG_LEX to look for for a "yywrap"
function in LEXLIBS.
Therefore we add the "noyywrap" option to follow the more
modern AC_PROG_LEX invocation.
Require a certain baseline of tool versions, in this case
from around 2013 (autoconf 2.69 and automake 1.14).
This is a significant advancement over the old requirement
of autoconf 2.60 (from 2006) and no requirement on automake
which gives us features without needing a very recent system.
The exact versions to require might be up to debate.
This is just the raw result of running "autoupdate" to update
the src/configure.ac file to a more recent standard.
Manual fixes to the autoupdate output will happen over the next
few commits.
This fixes some of the autoreconf time warnings, e.g. about AC_TRY_*
being used instead of AC_*_IFELSE.
When called from a working directory different from the directory
where the bootstrap script is located, make the bootstrap script
only work on its own directory and not whatever the current working
directory just happens to be.
Let the autoreconf tool handle the sequencing of tool calls.
The autoreconf tool has been dealing with calling tools like
aclocal, libtoolize, etc. quite well for about the last 20 years.
This keeps the "bootstrap" script around to keep the old way
of calling bootstrap working, i.e. maintain compatibility with the
existing workflows.
Move all autotools helper scripts and auxiliary files installed
automatically by the autotools to auto-aux/ (e.g. config.guess,
depcomp, install-sh, texinfo.tex, etc.).
Moving AC_CANONICAL_TARGET after AC_CONFIG_AUX_DIR works
around a silent bug in Autoconf 2.69 where the generated
configure script would not find the install-sh file which
has been placed in that given aux directory.
Moved AM_INIT_AUTOMAKE which must also happen after
AC_CONFIG_AUX_DIR.
This add some basic CI checks which exercise the autotools build:
* make targets "all" "install" testing compilation and installation
* run the same dry-run test-avrdude check as the cmake builds
* make target "distcheck" testing that dist tarball contains all
the necessary files
The calloc(3) function has two arguments: the number of members,
and the size of one member.
sizeof(...) makes more sense as member size, and 1 as number
of members. At least that is what the gcc warning wants.
This was the only compiler warning I could get on my Fedora 40
test build (gcc 14) with CFLAGS="-Wall -Wextra -Werror".
Generate the version number used in the Autotools builds
via a script from the top-level CMakeLists.txt and git
information instead of manual editing.
This script mimics what the avrdude top-level CMakeLists.txt
does for composing AVRDUDE_FULL_VERSION.
Consequently, maintainers do not need to edit the version numbers
in the "src/configure.ac" file's "AC_INIT(...)" line any more.
However, unlike the cmake based builds, this does not print the
commit hash in the "avrdude --help" message or in the "avrdude.conf"
file's "avrdude_conf_version = " line. That will come later.
These are the six build types supported and what avrdude
versions cmake and the autoconf builds actually produce:
cmake autoconf
git clone release 7.2 7.2
git clone non-release 7.2-DATE+HASH 7.2-DATE
git archive release 7.2 7.2
git archive non-release 7.2 7.2
dist tarball release N/A 7.2
dist tarball non-release N/A 7.2-DATE
Sometimes when building with the Autoconf buildsystem,
the avrdude-html/ subdir already exists and therefore
renaming the newly built avrdude/ subdir to avrdude-html/
cannot succeed.
Removing the old avrdude-html/ subdir first fixes that.