1
0
mirror of git://sigrok.org/libserialport synced 2023-08-10 21:13:24 +03:00
Commit Graph

50 Commits

Author SHA1 Message Date
Stefan Tauner
95bad38c5b Canonicalize symlinks in portnames
This allows users to supply symlinks created e.g. by udev rules instead
of the actual device names.
2017-09-13 19:27:50 +02:00
Uwe Hermann
2a6c24be33 FreeBSD: Add missing libusb-2.0 to pkg-config file.
This fixes bug #1033.
2017-09-13 15:04:56 +02:00
Uwe Hermann
d8de88de32 configure summary: Show compiler version and flags. 2017-03-05 17:01:17 +01:00
Uwe Hermann
0b53933127 configure summary: Show whether shared/static build is enabled. 2017-03-05 16:43:58 +01:00
Uwe Hermann
5ec2f93bce configure summary: Slightly change formatting. 2017-03-05 16:42:37 +01:00
Paul Cercueil
b2359c5c99 libserialport: Fix Linux files not compiled in with a toolchain for ucLinux
Buildroot can create toolchains for the no-MMU flavour of Linux, with a triple
containing 'uclinux' instead of just 'linux'.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
2016-09-04 18:42:43 +02:00
Uwe Hermann
3fcdc9f7d5 Bump libtool version (not package version) to 1:0:1.
The last release (0.1.0) had the libtool version (current:revision:age)
set to 0:0:0. Since this release doesn't change/remove any
interfaces (it does *add* new interfaces, though), 'current' and 'age'
are increased and 'revision' is set to 0, resulting in 1:0:1.

http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info

Programs using libserialport don't need to be recompiled or relinked.
2016-01-27 12:36:01 +01:00
Daniel Elstner
1a584c45b0 Build: Include config.h first in all source files 2015-09-13 20:04:31 +02:00
Daniel Elstner
07f61c7131 configure: Enable largefile support on 32-bit systems 2015-08-26 22:49:40 +02:00
Daniel Elstner
f1c916ede1 Build: Clean up configure.ac and Makefile.am
Among other things, rename some config defines so we can take
advantage of standard Autoconf macros.
2015-08-26 21:55:10 +02:00
Uwe Hermann
025c264448 autotools: Don't set/override "user variables".
This fixes bug #577.
2015-04-19 19:01:08 +02:00
Uwe Hermann
3dd4a2ae39 configure.ac: Drop no longer needed SP_PKGLIBS. 2015-04-19 18:21:19 +02:00
Uwe Hermann
3f2f48fc01 Set package version to 0.1.1, use "@since 0.1.1" Doxygen tags.
The next release will not contain any backwards-incompatible
API or ABI changes, thus changing the package version to 0.1.1.
2015-04-19 18:13:53 +02:00
Uwe Hermann
777347a6bd windows: Drop no longer needed -luuid.
Also, use SP_LIBS in Makefile.am.

This is build-tested using a native MinGW-w64 based toolchain
as well as a MinGW-w64 based cross-compile setup.
2015-04-18 21:54:42 +02:00
Uwe Hermann
8c6de591a5 configure.ac: Minor whitespace cosmetics. 2015-04-18 21:54:42 +02:00
Uwe Hermann
5ca38cdfe0 configure.ac: Add #include guard to config.h. 2015-04-18 21:54:42 +02:00
Uwe Hermann
613c48f191 Fix a compiler warning when -Wshadow is used.
CC       serialport.lo
  In file included from ../serialport.c:25:0:
  ../serialport.c: In function 'get_config':
  ../libserialport_internal.h:227:25: warning: declaration of 'ret' shadows a previous local [-Wshadow]
   #define TRY(x) do { int ret = x; if (ret != SP_OK) RETURN_CODEVAL(ret); } while (0)
                           ^
  ../serialport.c:1566:3: note: in expansion of macro 'TRY'
     TRY(get_baudrate(port->fd, &config->baudrate));
     ^
  ../serialport.c:1543:6: warning: shadowed declaration is here [-Wshadow]
    int ret = get_flow(port->fd, data);
        ^

Also, add -Wshadow to the list of default compiler options.
2015-04-18 21:54:42 +02:00
Uwe Hermann
3cb7aa98c2 configure.ac: Use $host_os instead of $target_os.
$build and $build_os refer to the machine on which the software is
built, $host and $host_os refer to the machine for which the software
is (cross-)built.

The variables $target and $target_os (despite the confusing names)
are only relevant in the context of building cross-compilers.
2015-04-07 00:49:27 +02:00
Uwe Hermann
1cda3e3dfc configure.ac: Add -Wmissing-prototypes. 2015-04-03 22:13:06 +02:00
Martin Ling
7c081505e5 Generate a config.h rather than passing defines on command line.
Fixes bug #553.
2015-03-24 23:15:32 +00:00
Uffe Jakobsen
ccd512d51c Implement FreeBSD OS-specific serial port detection and query 2015-02-15 21:28:15 +01:00
Martin Ling
59182fbbbf linux: Check for BOTHER macro at configure time.
This fixes bug #363.
2014-11-01 18:36:09 +01:00
Aurelien Jacobs
653cef3ab1 linux: remove readlinkat() dependency 2014-09-04 20:13:55 +02:00
Martin Ling
7f450f46bd Compile with -pedantic. 2014-08-24 14:06:21 +01:00
Bert Vermeulen
942a6d349e Bump package version to 0.2.0. 2014-08-20 23:40:19 +02:00
Uwe Hermann
900904638b configure.ac: We no longer need to set WINVER explicitly.
Since we now require MinGW-w64, we no longer have to set WINVER manually,
since MinGW-w64 defaults to WINVER=0x0502 (which corresponds to
Windows Server 2003 SP1 / Windows XP SP2 apparently, which is fine for us).
2014-08-05 21:22:59 +02:00
Uwe Hermann
9a8d04bca6 configure.ac: MinGW build fix (setting WINVER=0x0501).
Without this the build fails with:

  windows.c:40:43: error: 'WC_NO_BEST_FIT_CHARS' undeclared (first use in
  this function)
2014-07-31 23:11:40 +02:00
Marcus Comstedt
12056e2f75 Avoid use of struct serial_struct on systems which don't have it (Android)
This fixes bug #376.
2014-07-06 14:16:56 +02:00
Marcus Comstedt
5bd33b7c8b Don't use readlinkat if it does not exist
This fixes bug #377.
2014-07-06 14:15:46 +02:00
Aurelien Jacobs
970f279ae4 Introduce SP_API/SP_PRIV to mark visibility of functions. 2014-07-02 14:43:32 +02:00
Martin Ling
e4ce975a54 Fix build for platforms without enumeration & port metadata support. 2014-06-14 12:27:54 +01:00
Martin Ling
e33dcf90a0 Tidy up and split most OS-specific code to separate files. 2014-06-11 15:10:29 +01:00
Aurelien Jacobs
a93fb46888 Add new APIs to get some USB descriptor details for USB serial ports. 2014-06-10 23:51:11 +02:00
Aurelien Jacobs
98cac5d63e Remove the udev dependency and parse the /sys hierarchy instead. 2014-06-10 22:17:07 +02:00
Uwe Hermann
9fb991348d configure.ac: Add 'check-news' automake option.
This warns if the NEWS file hasn't been updated before a release.
2014-05-05 02:09:11 +02:00
Martin Ling
5cea279a85 linux: Speed fields may not be present in kernel termios structures. 2014-01-03 13:38:06 +01:00
Martin Ling
27e231ff35 Only build linux_termios.c on Linux. 2014-01-03 11:52:53 +01:00
Uwe Hermann
7c3a1ee32a configure.ac: Cosmetics, fix typo. 2013-12-27 02:28:10 +01:00
Martin Ling
2dcf830888 Remove various unused code in configure.ac. 2013-12-18 15:59:58 +00:00
Martin Ling
397d89de3a Make libudev optional. 2013-12-05 20:21:39 +00:00
Uwe Hermann
7de20e3915 Use common 3-digit package version number. 2013-11-22 16:44:29 +01:00
Martin Ling
40978c2b41 Support non-standard flow control modes on Linux. 2013-11-21 11:52:41 +00:00
Martin Ling
7a6d2196e0 Support custom baudrates on Linux. 2013-11-21 11:51:08 +00:00
Uwe Hermann
728f6de510 Use new project URL. 2013-11-15 11:36:14 +01:00
Uwe Hermann
e4bffe06c2 pkg-config file: Use Requires.private to fix static build.
Any libs needed when building static binaries must be listed in the
'Requires.private' field of the installed pkg-config file libserialport.pc.

Currently, this is libudev (but only when building on/for Linux).
2013-11-15 09:28:34 +01:00
Uwe Hermann
baba075903 libserialport.h: Add package/lib version macros.
These can be used by frontends e.g. for conditional compilation, or
simply for printing, logging to debug output, and so on.
2013-11-15 09:28:34 +01:00
Uwe Hermann
a3d4a56e15 configure.ac: Drop unneeded AC_MSG_ERROR.
The default behaviour of PKG_CHECK_MODULES is to abort with an error
anyway, but it will also print a more usable error message and hints
for the user about how to use PKG_CONFIG_PATH and so on.
2013-11-15 00:42:40 +01:00
Uwe Hermann
f92f1f0c20 Minor cosmetics, typos, and so on. 2013-11-15 00:42:40 +01:00
Martin Ling
1ebf4347e0 Fix building on OSX and Linux. 2013-11-15 00:42:37 +01:00
Martin Ling
0662f2bb88 Add build system. 2013-10-27 11:01:44 +00:00