Commit Graph

250 Commits

Author SHA1 Message Date
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
Daniel Elstner 1f501d72ef configure: Avoid bashism breaking the C++ bindings 2015-01-31 21:09:01 +01:00
Uwe Hermann 5801d558e7 Lower dependency to glib 2.32.
By avoiding g_slist_copy_deep() for now, we can easily allow libsigrok
to build against glib 2.32 (less hassle for users of stable/older
distros or OSes).
2015-01-29 13:55:55 +01:00
Uffe Jakobsen d5062672dd Check for librevisa >= 0.0.20130412 - the latest official release 2015-01-24 19:57:33 +01:00
Uwe Hermann 161dc24d84 cxx: Rename include/libsigrok/ to include/libsigrokcxx/. 2015-01-17 20:26:14 +01:00
Uwe Hermann 52ff4f6a04 Rename libsigrokxx to the more common libsigrokcxx. 2015-01-17 18:52:43 +01:00
Jiří Pinkava 84b448ee06 Do not check for JDK headers if Java bindings are disabled.
This removes an unnecessary build dependency on JDK and fixes
build troubles on systems where javac is present but JDK is not
installed and Java bindings are disabled by ./configure --disable-java.
2014-11-23 17:58:21 +01:00
Uwe Hermann b71356d631 bindings: Re-enable Java, but ignore create_analog_packet().
This will need some fixing.
2014-11-14 16:58:38 +01:00
Uwe Hermann 57621c6d60 configure.ac: Temporarily disable Java bindings.
Those need a bugfix to make them build again:

  bindings/java/org/sigrok/core/classes/Context.java:92: error: method Context_create_analog_packet in class classesJNI cannot be applied to given types;
        long cPtr = classesJNI.Context_create_analog_packet(swigCPtr, this, ChannelVector.getCPtr(tempchannels), SWIGTYPE_p_float.getCPtr(data_pointer), num_samples, Quantity.getCPtr(mq), mq, Unit.getCPtr(unit), unit, QuantityFlagVector.getCPtr(mqflags), mqflags);
                              ^
    required: long,Context,Vector<Channel>,long,long,long,Quantity,long,Unit,long,QuantityFlagVector
    found: long,Context,long,long,long,long,Quantity,long,Unit,long,QuantityFlagVector
    reason: actual argument long cannot be converted to Vector<Channel> by method invocation conversion
  1 error
  Makefile:3352: recipe for target 'bindings/java/sigrok-core.jar' failed
2014-11-13 18:51:33 +01:00
Uwe Hermann 3982b93840 configure.ac: Drop ols Windows exception, should be obsolete.
(see #205)
2014-10-13 16:23:48 +02:00
Janne Huttunen b50891952d Add driver for DER EE DE-5000 LCR meter.
Add a driver for the DER EE DE-5000 LCR meter. This meter is based on
the Cyrustek ES51919/ES51920 chipset and communicates with the host
computer via an optional connectivity kit.

The kit uses an optoisolated unidirectional link to connect to the
meter and an USB cable on the host side. Internally the connection is
using the FTDI FT232R USB UART chip i.e. from the host computer point
of view the meter is connected into an RS-232 serial port.

This driver implements just a thin shim layer for registering the
driver and uses the es51919 module for all the actual work.
2014-10-13 00:56:11 +02:00
Bert Vermeulen 818df9f8ec build: Require glib 2.34. 2014-10-08 23:14:01 +02:00
Martin Ling da89e23a28 Use AM_PATH_PYTHON macro to find Python binary.
A specific interpreter can now be passed to configure e.g:

./configure PYTHON=python3
2014-09-14 02:32:49 +01:00
Uwe Hermann 0d14e30ba0 configure.ac: Add and use DRIVER2() to shorten file. 2014-09-08 23:53:42 +02:00
Uwe Hermann d3619a9b63 configure.ac: Shorten per-driver lines a bit. 2014-09-08 23:53:42 +02:00
Uwe Hermann 416de3ba05 configure.ac: Don't duplicate driver name.
The AC_DEFINEs don't need any driver names really, those only end up
as code comments in config.h and are otherwise useless. Thus, don't
duplicate them, we already have the driver names in DRIVER().
2014-09-08 23:53:42 +02:00
Uwe Hermann a0ca437de3 configure.ac: Show SCPI backends that'll be compiled. 2014-09-08 22:58:14 +02:00
Uwe Hermann 62ea3ef552 configure.ac: Whitespace, cosmetics, sorting, etc. 2014-09-08 22:42:26 +02:00
Bert Vermeulen ca1a7cb56f scpi-pps: Initial driver skeleton. 2014-09-08 12:45:21 +02:00
Bert Vermeulen d6e63a2c68 build: Use pkgconfig for libgpib. 2014-09-05 18:26:12 +02:00
Martin Ling bb2a4ed407 Add GPIB SCPI backend using linux-gpib and libgpib. 2014-09-05 10:34:04 +01:00
Marcus Comstedt d92de05ad1 C++: Provide fallbacks for missing stoi/stod functions
Notably, Android does not provide these functions.  The fallback
implementation is based on the one in the GNU ISO C++ Library.
2014-08-31 13:31:35 +02:00
Soeren Apel 107639373d yokogawa-dlm: Integrate driver skeleton 2014-08-31 00:42:10 +02:00
magnuskarlsson 4bd80e1228 added pipistrello-ols
Conflicts:
	configure.ac
	src/hwdriver.c
2014-08-25 01:00:55 +02:00