The automake 'std-options' option checks whether all installed tools
and scripts have a --help and --version CLI option. This check is not
needed for libsigrok though, since it doesn't install any tools.
This adds a suite of unit tests for libsigrok. It uses the 'Check'
tool/library (apt-get install check) to run the tests.
The configure tool tries to find libcheck. If it succeeds, a
"make check" will run all tests. Otherwise, none of the tests will
be built and "make check" will not run any tests.
This also means that users who don't have 'check' installed will still
be able to build and install libsigrok just fine.
We don't need a C++ compiler for libsigrok, so don't check for one.
This would cause a build failure on all systems where there is a C compiler
but no C++ compiler installed.
We no longer use gthread (its only user was the 'demo' driver), so drop
the 'configure' check for it.
The libsigrok.pc pkg-config file is still correct, since the 'configure'
result propagates there automatically.
Don't override/overwrite CFLAGS in configure.ac, but rather amend it
with (currently) "-Wall -Wextra -fvisibility=hidden".
This properly allows users/packagers to do things like:
./configure (this will default to using "-g -O2" additionally)
CFLAGS="-g -O2" ./configure (same as above)
CFLAGS="" ./configure (no additional flags)
CFLAGS="-g -O0" ./configure (disable optimization, e.g. for valgrind use)
etc. etc.
PKG_CHECK_MODULES() checks for libusb-1.0 via pkg-config already, no
need to use a "manual" additional check via AC_CHECK_LIB() just to set
HAVE_LIBUSB_1_0 in config.h.
This helps with cross-compiling setups, among other things.
The alsa driver was out of date wrt APIs and libsigrok conventions in
general, and wasn't compiling.
This fixes the compile and updates it to _basically_ work with the current
state of analog support in libsigrok.
This is not finished/full support for ALSA analog sampling yet, though,
various TODOs remain that will be addressed later.
All frontends will have to include <libsigrok/libsigrok.h> from now on.
This header includes proto.h and version.h, both installed from the
distribution into $INCLUDE/libsigrok/ as well.
The only dynamically changed header is now version.h, which has both
libsigrok and libtool compile-time versions in it.
We no longer expect firmware files to be in the
$prefix/share/libsigrok/firmware directory, as that would require an
additional (distro) package 'sigrok-firmware' or the like to install
files into another package's (libsigrok) path, which can be problematic.
The current 'sigrok-firmware' repo's "make install" will already install
all files into $prefix/share/sigrok-firmware.
Add ACLOCAL_DIR setting and AM_PROG_AR macro for compiling with Homebrew
under Mac OS X.
Applies essentially the same change to
{libsigrok,libsigrokdecode,sigrok-cli}/{autogen.sh,configure.ac}
It may be that the same fix is needed for the other autogen.sh and/or
configure.ac files, but that hasn't been tested and therefore not in
this commit.
The next (and first) libsigrok release will be called 0.1.0.
The next (and first) libsigrokdecode release will be called 0.1.0.
The next sigrok-cli release will be called 0.3.0 (as we already had a 0.1
and 0.2 release of sigrok-cli; those did not yet use the libs, though).
sigrok-gtk and sigrok-qt didn't have any releases yet, so their version
numbers are set to 0.1.0.
Also, consistently use three numbers/digits for our version numbers.
Use SR_API to mark public API symbols, and SR_PRIV for private symbols.
Variables and functions marked 'static' are private already and don't
need SR_PRIV. However, functions which are not static (because they need
to be used in other libsigrok-internal files) but are also not meant to
be part of the public libsigrok API, must use SR_PRIV.
This uses the 'visibility' feature of gcc (requires gcc >= 4.0).
Details: http://gcc.gnu.org/wiki/Visibility
- Package version (major.minor.micro)
- Library version (current:revision:age)
- Installation prefix (usually /usr/local)
- Detected libraries and their versions (only for pkg-config libs)