Commit Graph

273 Commits

Author SHA1 Message Date
Daniel Elstner 8c2024e021 Build: Implement libieee1284 check via SR_ARG_OPT_CHECK 2015-09-07 23:20:17 +02:00
Daniel Glöckner 28d86fa9a5 Check for libieee1284
Will be needed by the Hung-Chang DSO-2100 driver.
2015-08-30 19:03:51 +02:00
Daniel Elstner bbb3996c06 configure: Enable largefile support on 32-bit systems 2015-08-28 18:35:16 +02:00
Uwe Hermann 8006cdc53d configure.ac: Add libserialport dependency to kern-scale. 2015-08-28 16:32:14 +02:00
Uwe Hermann 607dcdeae1 kern-scale: Add initial driver contents.
This currently supports (and is tested on) the KERN EW 6200-2NM,
other models will be added later.
2015-08-28 11:59:31 +02:00
Uwe Hermann 9380ec2f05 kern-scale: Initial driver skeleton. 2015-08-28 11:43:04 +02:00
Daniel Elstner 65489c1ada Build: Use TESTS prefix instead of CHECK for flag variables
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.
2015-08-26 13:13:39 +02:00
Daniel Elstner e662d9e8e5 Build: Limit system features to C99 and POSIX
Use -std=c99 to try and enforce standard compliance.
2015-08-25 12:58:39 +02:00
Daniel Elstner ba1c29dc22 Build: Reduce unnecessary config substitutions
Variable substitutions with a constant value may as well be
set directly in Makefile.am.
2015-08-24 22:20:30 +02:00
Daniel Elstner bc8ff24de6 Build: Leave LIBS alone during configure
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.
2015-08-24 22:19:05 +02:00
Daniel Elstner 4ed3d9b6db Build: Simplify driver dependency check 2015-08-24 20:15:36 +02:00
Daniel Elstner 2d143826b0 Build: Add private copy of C++11 check macro
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.
2015-08-24 20:15:20 +02:00
Daniel Elstner 0ab8386a5c Build: Prefer newer versions of libftdi and SWIG 2015-08-24 20:14:57 +02:00
Daniel Elstner 26b67f1141 Build: Use commas to separate missing dependencies
Beautify the output. Also fix the PyGObject test.
2015-08-24 20:14:48 +02:00
Daniel Elstner b84a733105 Build: Check for accepted compiler flags
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.
2015-08-24 20:12:47 +02:00
Daniel Elstner 1bb196e496 Build: Move package check macros to m4/sigrok.m4
Define generic macros for pkg-config dependency checks etc. in
m4/sigrok.m4, so they can be easily reused by downstream modules.
2015-08-24 20:10:18 +02:00
Daniel Elstner 4cf2f34f43 Build: Make compiler warnings configurable
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".
2015-08-24 20:08:24 +02:00
Daniel Elstner 24138539c1 Build: Move custom Autoconf macros to separate file
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.
2015-08-24 20:07:01 +02:00
Daniel Elstner ea1d535145 Build: Place Autoconf macros into m4/ directory
This separates the M4 macros from the other cruft in autostuff/
to prepare for the introduction of custom macro files.
2015-08-24 20:04:29 +02:00
Daniel Elstner cb4d28efd1 Build: Do not omit first argument to m4_warn()
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.
2015-08-24 20:04:13 +02:00
Uwe Hermann aafcb3fe87 FreeBSD: Also check for swig3.0.
On FreeBSD (for example) the SWIG binary can also be called "swig3.0".

This fixes (together with the recent "swig2.0" addition) bug #557.
2015-08-19 15:44:43 +02:00
Uwe Hermann 3f03ffaf2f FreeBSD: Also check for swig2.0 in addition to swig.
On FreeBSD (for example) the SWIG binary is called "swig2.0".

This fixes bug #557.
2015-08-18 18:28:30 +02:00
Daniel Elstner da0763d096 Build: Skip C++ CFLAGS and LIBS check when disabled
It is not a good idea to invoke PKG_CHECK_MODULES with an empty
list of modules to check, so skip the invocation in that case.
2015-08-18 18:20:50 +02:00
Daniel Elstner b8b727e45f Build: Fix typo that broke the driver enable options 2015-08-18 18:20:50 +02:00
Daniel Elstner d37c7109bf Build: Make SR_DRIVER() handle dependencies
Turn the hardware driver dependency handling on its head, by
making SR_DRIVER() take a list of dependencies to check for.
2015-08-18 18:20:50 +02:00
Daniel Elstner 7c16e74d45 Build: Make dependency on git change more robust
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.
2015-08-18 18:20:50 +02:00
Uwe Hermann 965d68898a Build: Show glib/libzip version requirements in configure summary. 2015-08-16 23:56:43 +02:00
Uwe Hermann 2700e63d48 Build: Fix a typo causing libftdi1 detection issues. 2015-08-16 23:53:23 +02:00
Daniel Elstner 2cbde15198 Build: Properly namespace the version defines
Use the CONF_ prefix for the configured host define as well as
the various build-time version macros.
2015-08-16 18:53:32 +02:00
Daniel Elstner 1f61c22ff5 Build: Cleanup up and modernize autotools setup
Note that some --enable options of configure have become
--with or --without options.
2015-08-16 18:28:13 +02:00
Daniel Elstner c5f179a975 Build: Simplify the hardware driver selection
Replace DRIVER() and DRIVER2() by a single SR_DRIVER() macro.
Derive the names of shell variables and preprocessor defines
programatically to cut down on repetition.
2015-08-16 18:28:13 +02:00
Daniel Elstner 9ac018d0fc Build: Pass nostdinc option to automake
It seems automake automatically adds the directory containing
the generated version.h to the include path.  Use nostdinc to
disable default includes altogether.
2015-08-16 18:28:13 +02:00
Daniel Elstner 7f289d14ec Build: Append git revision hash to version
Append the git revision hash to the libsigrok package version,
unless HEAD exactly matches a release tag.  Note that this does
not affect the version known to autoconf -- e.g. source tarballs
created by make dist will not receive a revision suffix.

Changes to git HEAD automatically trigger a reconfiguration.
Uncommitted changes do not, which is why I left out the -dirty
suffix.
2015-08-16 18:28:13 +02:00
Daniel Elstner b9eb8e1a8c Consistently use SR_PACKAGE_VERSION instead of VERSION 2015-08-16 18:28:13 +02:00
Daniel Elstner 27a2497dc2 Build: Delay expansion of $datadir in FIRMWARE_DIR
Make it so that $(datadir) is resolved at make time, as per
autotools recommendations.  Note that $datadir is not fully
resolved at configure time to begin with, i.e. part of it
already was evaluated at make time.
2015-08-16 18:28:13 +02:00
Daniel Elstner b2478a23db Build: Make version.h a configuration header
Use the proper tool for the job and make libsigrok/version.h
a secondary configuration header, so that autoconf's AC_DEFINE
machinery can be used to generate it.  Note that the header
template is still hand-written, enabling fine control of the
content.
2015-08-16 18:28:13 +02:00
Daniel Elstner c1aae90038 Build: Set local include directories in Makefile.am
Move the include flags for files in the source tree from
configure.ac to Makefile.am where they belong.  Also use
AM_CPPFLAGS instead of CFLAGS/CXXFLAGS to make sure the
files in the build/source tree are always picked up first.

Also, remove the include/libsigrok sub-directory from the
search path, thereby making the <libsigrok/> prefix mandatory
when building libsigrok itself.  This matches the convention
already imposed on users of the library.
2015-08-16 18:28:12 +02:00
Uwe Hermann bd7b83cf63 backend: Output lib versions, host, and endianness in sr_init().
This should help to more easily debug issues reported by users.
2015-08-15 21:06:30 +02:00
Uwe Hermann 176c7219bb Only build BayLibre ACME driver if <sys/timerfd.h> is available.
This fixes bug #610 (Android build issue).
2015-07-25 19:50:36 +02:00
Uwe Hermann e6b8f35fa7 Bump version to 0.4.0 (the upcoming next major release). 2015-07-18 18:03:29 +02:00
Uwe Hermann 025f6ed862 Append "-git" to the version string.
This avoids confusion with the released tarballs.
2015-07-18 17:54:41 +02:00
Aurelien Jacobs e1ccfb1910 maynuo-m97: Initial driver skeleton. 2015-06-07 20:15:08 +02:00
Aurelien Jacobs e35e1e7bab Compile with -std=c11 along with _POSIX_C_SOURCE=200112L.
With gcc 5.1 released and defaulting to std=gnu11, the code will be compiled
according to different standards depending on the compiler version so we
should better specify explicitly what standard we are targetting.
C11 is now quite mature, it is supported in the just release Debian stable
(gcc 4.9) and also in old-stable (gcc 4.7), so there should be no reason to
use anything more ancient.
We also should have no reason to need any non-standard GNU extension.
So using only C11 + POSIX sounds like the best option right now.
2015-04-28 22:07:03 +02:00
Uwe Hermann 8d80146722 Lower libserialport requirement to 0.1.1. 2015-04-19 18:39:35 +02:00
Uwe Hermann 2d31e8bcbd configure.ac: Drop unneeded AC_CANONICAL_SYSTEM. 2015-04-08 18:50:07 +02:00
Uwe Hermann 2560941223 configure.ac: Two more fixes for the baylibre-acme detection. 2015-02-26 18:55:17 +01:00
Vladislav Ivanov f80b3fe234 configure.ac: Fix baylibre-acme OS check. 2015-02-26 11:14:55 +01:00
Bartosz Golaszewski a0b277ba67 configure.ac: Compile baylibre-acme driver for Linux only.
The driver for BayLibre ACME depends on Linux-specific sysfs
interfaces to ina226 and tmp435 devices. Exclude it for different
targets.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2015-02-16 01:20:07 +01:00
Bartosz Golaszewski dfaee1de17 baylibre-acme: Initial driver skeleton.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2015-02-16 01:20:07 +01:00
Bartosz Golaszewski 3cdff6cd2d configure.ac: Add AC_CANONICAL_SYSTEM macro.
In order to determine the target OS when cross-compiling libsigrok
we need autotools to set the 'target_os' variable. This macro
determines the system type and sets output variables to the names
of the canonical system types.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2015-02-11 16:22:56 +01:00