summaryrefslogtreecommitdiff
path: root/configure.ac
Commit message (Collapse)AuthorAgeFilesLines
* autobuild: Fix two issuesChris Dickens2020-01-261-2/+2
| | | | | | | | | | | The test for defining the automake conditional for the poll implementation was keying off of the threads variable, producing incorrect results for Cygwin. A simple typo in the Makefile causes a build failure when cross-compiling for Windows. Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* configure.ac: Cleanup and refactoringChris Dickens2020-01-241-183/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the formatting consistent across the entire file. In particular: - Always quote strings whose values are derived - Use tabs consistently - Wrap all arguments with square brackets Replace the use of '-a' with '&&' to be more portable. Rearrange some of the feature checks to be conditional upon the platform or backend. For example, there is no need to check for nfds_t on Windows because poll() doesn't exist there. Similarly we now only check for timerfd on Linux and Solaris. This translates into slightly faster configure times. Explicitly define tokens for both the poll and thread implementations. This makes the preprocessor conditionals much nicer since it is not necessary to enumerate all possible OS_* tokens. Also replace POLL_NFDS_TYPE with a proper typedef that is based on the availability of the nfds_t type. Migrate to config definition names that are more consistent with autoconf. The check for timerfd actually verifies the presence of the library function instead of just the header definitions, and the token USBI_TIMERFD_AVAILABLE is now HAVE_TIMERFD. Similarly the check for syslog results in a definition of HAVE_SYSLOG. Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* Windows: Drop support for Windows XPChris Dickens2020-01-211-2/+1
| | | | | | | | | XP is nearly 20 years old and there are hoops we jump through to keep supporting it. Time to say goodbye and simplify some things. Closes #267 Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* Add Null POSIX backendPino Toscano2019-12-281-1/+12
| | | | | | | Add a simple null backend for POSIX platforms that reports no available devices, and provides no capabilities. Make use of this new backend on all the OSes without an existing backend, so libusb can be built even on OSes without USB support.
* Unix: fix library version for next releaseLudovic Rousseau2019-08-091-1/+1
| | | | | | | | | | | | | | | | https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html says: 4. If any interfaces have been added, removed, or changed since the last update, increment current, and set revision to 0. 5. If any interfaces have been added since the last public release, then increment age. So both current and age must be incremented. The patch in fde20bb9b7cba0ea6e96db920d0a0169c361ca92 was not complete. Signed-off-by: Ludovic Rousseau <ludovic.rousseau@free.fr>
* configure.ac: bump .so version for next releasetestNathan Hjelm2018-12-051-1/+1
| | | | Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
* configure.ac: fix detection of clock_gettime libraryBaruch Siach2018-10-221-1/+1
| | | | | | | | | | | | | | | glibc before 2.17 requires link with librt for clock_gettime(). The AC_SEARCH_LIBS check in configure.ac should detect this dependency. Unfortunately commit cb77a25e51 (configure.ac: Remove obsolete AC_ERROR and make formatting consistent) inadvertently renamed to clock_gettime2, thus breaking librt detection. Restore the correct clock_gettime() name. Closes #439 Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
* Windows: Ditch UsbDk build configurationSameeh Jubran2018-01-081-9/+0
| | | | | | | Previous patch introduced run-time UsbDk backend activation, therefore separate build configuration is not needed anymore. Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
* Misc: Ensure that both WINVER and _WIN32_WINNT are defined for Windows buildsChris Dickens2018-01-031-0/+1
| | | | Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* linux: Mark internal file descriptors as CLOEXECChris Dickens2017-02-281-1/+2
| | | | | | | | | | | | As a library, libusb should take care to be as friendly as possible with various use cases. One such way is to ensure that internal file descriptors have the CLOEXEC flag set, thus allowing processes to do a fork() + exec() without leaking libusb's file descriptors to the child process. References #268 Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* configure.ac: Remove obsolete AC_ERROR and make formatting consistentChris Dickens2017-02-201-40/+40
| | | | | | | | Remove unnecessary quotes around simple string values. Replace AC_ERROR with AC_MSG_ERROR. Use [] around arguments to macros. Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* configure.ac: Clean up styleChris Dickens2017-01-121-24/+24
| | | | | | | | | | For consistency, only use quotes for strings where variables are interpolated. Also make the check for syslog capability dependent upon whether system logging has been enabled. Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* core: Remove use of gettimeofday()Chris Dickens2017-01-121-10/+4
| | | | | | | | | | | | | | | | | Prior to this commit, gettimeofday() was being used for timestamps in debug messages. This function has been marked as deprecated in the latest POSIX specification and furthermore is not supported on Windows, thus requiring our own implementation as usbi_gettimeofday(). This commit changes the logging code to obtain timestamps using the clock_gettime() function provided by the backend. The implementation of usbi_gettimeofday() for Windows was actually equivalent to that of the USBI_CLOCK_REALTIME implementation for clock_gettime(), so this eliminates code duplication. In addition, the USBI_CLOCK_REALTIME implementation has been updated for Windows to leverage the timespec_get() function available in VS 2015 and later. Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* core: Remove check for and inclusion of signal.hChris Dickens2017-01-121-1/+0
| | | | Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* Solaris backendLei Chen2016-07-241-1/+15
| | | | | | Closes #177 Signed-off-by: Nathan Hjelm <hjelmn@me.com>
* configure: bump autoconf version and remove obsolete AM_MAINTAINER_MODENathan Hjelm2016-03-111-2/+1
| | | | | | | | | | | | This commit bumps the minimum autoconf version to 2.69. This only affects maintainers and will ensure libusb tarballs have up-to-date configure scripts. At the same time we are removing the AM_MAINTAINER_MODE macro as even its creator recommends against using it. Closes #122 Signed-off-by: Nathan Hjelm <hjelmn@me.com>
* windows: Fix compilation for MSYS2Evan Hunter2016-02-231-1/+1
| | | | | | Closes #140 Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* linux_netlink: Remove unnecessary header includes and conditionalsChris Dickens2016-02-231-4/+2
| | | | | | We always require <sys/socket.h> and do not need <linux/filter.h>. Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* build: Integrate usbdk backendDmitry Fleytman2016-01-261-0/+9
| | | | | Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com> Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* Misc: Simplify Haiku build and fix broken parallel buildChris Dickens2015-12-171-1/+1
| | | | | | | | | | | | | | | | | | The Haiku build was previously being done as a nested package due to its C++ requirement, but for some reason setting SUBDIR in an automake conditional breaks parallel builds. To fix this and simplify the Haiku build process, this commit adds an unconditional check for a C++ compiler using AC_PROG_CXX and builds the Haiku sources as part of the main libusb project. Note that AC_PROG_CXX itself does not cause the configure script to fail if a C++ compiler is not found. Therefore on non-Haiku platforms there is no requirement to have a C++ compiler installed in order to build libusb. Closes #121 Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* Remove -c flag. Erroneous output caused on androidVenkatesh Shukla2015-03-011-3/+0
| | | | | | | | | | | While cross-building for android, the -c flag was causing errors. This -c option ends up in Libs.private of libusb-1.0.pc file. On its usage, it is interpreted as "Compile and assemble, but do not link" option of gcc. Usage of -c in this way might be unintended. Hence, removing this option. Signed-off-by: Venkatesh Shukla <venkatesh.shukla.eee11@iitbhu.ac.in> Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
* haiku: Add Haiku supportAkshay Jaggi2014-09-251-1/+26
|
* Windows: Define WINVER to fix building on MinGWTormod Volden2014-09-031-0/+1
| | | | | * For newer versions of MinGW, VerSetConditionMask() is only defined if building for Windows XP (0x501) or newer.
* Misc: Revert all references to libusb/libusb.infohjelmn@cs.unm.edu2014-01-081-1/+1
|
* Android: Add support for Linux/Android platformsKuangye Guo2013-12-281-0/+22
| | | | * Closes #154
* configure.ac: uclinux is also linuxGustavo Zacarias2013-09-061-1/+1
| | | | | | | | When the tuple contains uclinux rather than just linux (nommu flat targets) configure will fail with an unknown operating system. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* openbsd: Split openbsd backend into separate openbsd and netbsd backendsHans de Goede2013-08-211-6/+15
| | | | | | | | | | | Note the new netbsd_usb.c is an unmodified copy of openbsd_usb.c with s/obsd/netbsd done on it. The reason for this split is that the openbsd developers have been working on various improvements for their userspace usb support, and adding support for those means breaking netbsd support, by giving netbsd its own backend we can add support for the openbsd improvements without breaking netbsd support. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Core: Add compile time option to use native OS logging facilityToby Gray2013-08-091-5/+20
| | | | | | | | | | * This change makes it easier to debug issues in UI applications which don't necessarily have a console connected to stderr. * Outputting to the debugger shouldn't occur in normal situations so this change has to be explicitly enabled by a build-time config flag. * Uses OutputDebugString() on Windows platforms or the syslog facility on other OSes, if available. * Also align the report of configure defaults to autotool's.
* Add checks for headers needed by linux/netlink.hNathan Hjelm2013-07-301-1/+9
| | | | | | | | These headers are required by netlink.h. I am not sure how this worked at all. It certainly doesn't work with older versions of Linux 2.6. References #124.
* configure: Fix --enable-udev help textHans de Goede2013-05-161-1/+1
| | | | | | | We use AC_ARG_ENABLE so the help string should be --enable-udev, so that the user knows to pass --disable-udev to disable udev Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Add hotplug support to the Linux backend.Nathan Hjelm2013-05-151-1/+14
| | | | | | | | | | There are two ways to configure hotplug support for Linux: udev, and netlink. It is strongly recommened that udev support is used on systems that utilize udev. We reenforce this recommendation by defaulting to --with-udev=yes at configure time. To enable netlink support run configure with --with-udev=no. If udev support is enabled all device enumeration is done with udev. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Core: Use HAVE_SYS_TYPES_H and HAVE_SIGNAL_HPete Batard2013-01-231-0/+1
| | | | * These files may not be available on all platforms (eg. WinCE)
* Tests: Add libusbx stress testToby Gray2012-11-251-0/+8
| | | | | See https://github.com/tobygray/libusbx/tree/testing as well as http://libusbx.1081486.n5.nabble.com/Libusbx-devel-Crashes-tt433.html#a438
* Autotools: Carry over 2012.10.23 libusb changesPeter Stuge2012-11-251-10/+7
| | | | | | * Use LIBS instead of PC_LIBS_PRIVATE * Move THREAD_CFLAGS & VISIBILITY_CFLAGS into AM_CFLAGS * Use AC_SEARCH_LIBS(clock_gettime) for pthreads on Linux
* Misc: Update and shorten various libusbx URLsPete Batard2012-08-221-1/+1
|
* Windows: Enable MinGW and MSVC DLL interchangeabilityPete Batard2012-06-081-0/+2
| | | | | | | | | | * Because we use the WINAPI calling convention, the def file MUST have the @n aliases. There is no way around this as MinGW's .o use decoration always for __stdcall, which can't be turned off. * dlltool must therefore be invoked to create a proper import lib from the .def, using the --kill-at option. * To do that, a CREATE_IMPORT_LIB autotools variable is introduced. * Note: the .def file is currently maintained manually.
* Windows: Fix possible crash when using longjmp and gcc 4.6Pete Batard2012-06-071-1/+2
| | | | | | | | * With gcc-4.6 the option -fomit-frame-pointer is turned on per default even for the win32 target. This results in segfaults for any application using setjmp/longjmp and MSVCRT.dll on WinXP. See http://gcc.gnu.org/ml/gcc/2011-10/msg00351.html * Issue reported by Lars Kanis
* Autotools: Fix versioning regression in configure.acPete Batard2012-06-051-1/+1
| | | | | | * Because of missing [], "LIBUSB_MICROLIBUSB_RC" was being displayed in lieu of version number * Regression introduced with c9d41fe5f0324d969f758f42843e1fd05859f438
* Core: Add toggleable debug loggingPete Batard2012-06-041-2/+2
| | | | | * Also fix a missing space in debug log messages introduced with the previous timestamp logging update
* Autotools: Apply autoupdate 2.68 recommendationsLudovic Rousseau2012-06-041-4/+4
| | | | | * Not applied: AC_PREREQ([2.68]) as this doesn't seem necessary and 2.68 was released less than 2 years ago.
* Core: Add a timestamping and thread ID to loggingPeter Stuge2012-05-061-0/+1
|
* BSD: add NetBSD experimental supportPete Batard2012-04-191-26/+43
| | | | | * also improve OS/backend selection in configure.ac * original libusb patches from Peter Stuge and Xiaofan Chen
* Autotools: Fix package name and URLs in configure.acPete Batard2012-03-301-1/+1
|
* autotools: LT_LANG([Windows Resource]) makes windres check redundantPete Batard2012-03-281-1/+0
|
* OpenBSD backendMartin Pieuchot2012-01-301-0/+12
|
* configure.ac: Darwin: Move -lobjc from LIBS to PC_LIBS_PRIVATEXiaofan Chen2012-01-131-2/+1
| | | | | | | | Since commit 40327cd134718475f6cec8935b856d4fdff2099c it is neccessary to explicitly include -lobjc not only when linking libusb itself, but also for programs linking statically against libusb. References #63. See also http://marc.info/?m=132505900202378
* configure.ac: Enable libtool support for Windows Resource languagePeter Stuge2011-10-171-0/+1
|
* Support release candidate versions in configure.ac and libusb-1.0.rcPeter Stuge2011-10-171-1/+5
|
* configure.ac: Fix #97 clang warning about -fgnu89-inlineSean McBride2011-07-241-7/+1
| | | | | | | Remove the test that sets the flag since GNU89 inline semantics are not required by libusb. [stuge: Also remove reference to the test result]
* Darwin: Fix #63 error when apps use Objective-C garbage collectionSean McBride2011-06-131-0/+1
|