Check for either Python 2 or Python 3 header files depending on
the version of the Python interpreter. Also require the module
version to exactly match the interpreter version.
This may fix bug #645.
zip_discard() was introduced in libzip 0.11, which some systems
do not have yet. Provide a fallback replacement for zip_discard(),
and reduce the requirement to libzip 0.10 again.
This fixes bug #674.
The hard-coded location is bound to be wrong anyway. Instead, rely
on the new resource lookup code to find the firmware files in a
location relative to the library or executable.
Since Autoconf places some important feature flags only into the
configuration header, it is necessary to include it globally to
guarantee a consistent build.
This is intended to make people notice when libusb is too old
for the new Windows code. However, this is not foolproof, since
the libusb version may be different at runtime.
In order to avoid confusion of the flags-gathering pkg-config
result with the actual test for the availability of "check",
change the pkg-config output variable prefix from CHECK to TESTS.
Put the extra libraries into SR_EXTRA_LIBS instead of LIBS.
Create an SR_CHECK_LIBS macro to make that easy. Substitute
SR_EXTRA_LIBS into libsigrok.pc, too.
Place a copy of ax_cxx_compile_stdcxx_11.m4 from the Autoconf
macro archive into our private m4/ directory. This is cleaner
than trying to parse M4 file versions etc. Plus, the macro is
now always available.
Introduce the SR_CHECK_COMPILE_FLAGS macro and use it to check
for additional compiler flags. Put the accepted flags into the
separate substitution variable SR_EXTRA_CFLAGS.
With this and the preceding changes, bug #578 should now be fixed.
Use the SR_ARG_ENABLE_WARNINGS macro to configure and check for
the availability of compiler warning flags. Maintain separate
sets of warning flags for C and C++.
The configure option --enable-warnings=[min|max|fatal|no] can
be used to set the compiler warning level for all languages.
The default level is "max".
Place custom Autoconf macros which other sigrok modules may
re-use into a separate file m4/sigrok.m4. Also, introduce new
macros for defining the package and library versions, and for
gathering compiler warning flags.
It seems that contrary to what the documentation says, leaving
the category argument to m4_warn() empty is not allowed. Use
the "unsupported" category for lack of a better choice.
It can sometimes happen that .git/HEAD or .git/refs/head/*, which
are added as config.status dependencies during configure, do not
exist anymore at build time. For instance, when the current branch
is deleted after switching to a different one.
Wrap the dependencies inside $(wildcard ...) to avoid this problem.
Note that this is a GNU make feature. However, it should be fine
as it is only used for git builds. Even if a non-GNU make is used,
the construct will hopefully just expand to nothing.