diff options
author | Daniel Schürmann <daschuer@mixxx.org> | 2015-12-01 23:43:02 +0100 |
---|---|---|
committer | Daniel Schürmann <daschuer@mixxx.org> | 2015-12-01 23:43:02 +0100 |
commit | d46433b0ae51edf2ca7529b0889691dd54f2bb90 (patch) | |
tree | 52b9b4e203a07a7d2a2b92ee7506b4c2a43c87a4 /lib | |
parent | 3609311739cb5e36b2bd821736f5fa56cb339865 (diff) | |
parent | 5c244910e7a2588a8533acc8e79ca2792b0324ab (diff) |
Merge remote-tracking branch 'upstream/1.12'
Conflicts:
README.md
src/defs_version.h
Diffstat (limited to 'lib')
71 files changed, 4999 insertions, 721 deletions
diff --git a/lib/hidapi-0.8.0-pre/linux/Makefile b/lib/hidapi-0.8.0-pre/linux/Makefile deleted file mode 100644 index 338bbd311f..0000000000 --- a/lib/hidapi-0.8.0-pre/linux/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -########################################### -# Simple Makefile for HIDAPI test program -# -# Alan Ott -# Signal 11 Software -# 2010-06-01 -########################################### - -all: hidtest - -CC ?= gcc -CFLAGS ?= -Wall -g - -CXX ?= g++ -CXXFLAGS ?= -Wall -g - -COBJS = hid-libusb.o -CPPOBJS = ../hidtest/hidtest.o -OBJS = $(COBJS) $(CPPOBJS) -LIBS = `pkg-config libusb-1.0 libudev --libs` -INCLUDES ?= -I../hidapi `pkg-config libusb-1.0 --cflags` - - -hidtest: $(OBJS) - $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ $(LIBS) -o hidtest - -$(COBJS): %.o: %.c - $(CC) $(CFLAGS) -c $(INCLUDES) $< -o $@ - -$(CPPOBJS): %.o: %.cpp - $(CXX) $(CXXFLAGS) -c $(INCLUDES) $< -o $@ - -clean: - rm -f $(OBJS) hidtest - -.PHONY: clean diff --git a/lib/hidapi-0.8.0-pre/windows/ddk_build/hidapi.def b/lib/hidapi-0.8.0-pre/windows/ddk_build/hidapi.def deleted file mode 100644 index 05e35afd68..0000000000 --- a/lib/hidapi-0.8.0-pre/windows/ddk_build/hidapi.def +++ /dev/null @@ -1,17 +0,0 @@ -LIBRARY hidapi -EXPORTS - hid_open @1 - hid_write @2 - hid_read @3 - hid_close @4 - hid_get_product_string @5 - hid_get_manufacturer_string @6 - hid_get_serial_number_string @7 - hid_get_indexed_string @8 - hid_error @9 - hid_set_nonblocking @10 - hid_enumerate @11 - hid_open_path @12 - hid_send_feature_report @13 - hid_get_feature_report @14 -
\ No newline at end of file diff --git a/lib/hidapi-0.8.0-pre/windows/ddk_build/makefile b/lib/hidapi-0.8.0-pre/windows/ddk_build/makefile deleted file mode 100644 index 637f712a42..0000000000 --- a/lib/hidapi-0.8.0-pre/windows/ddk_build/makefile +++ /dev/null @@ -1,49 +0,0 @@ -############################################################################# -# -# Copyright (C) Microsoft Corporation 1995, 1996 -# All Rights Reserved. -# -# MAKEFILE for HID directory -# -############################################################################# - -!IFDEF WIN95_BUILD - -ROOT=..\..\..\.. - -VERSIONLIST = debug retail -IS_32 = TRUE -IS_SDK = TRUE -IS_PRIVATE = TRUE -IS_SDK = TRUE -IS_DDK = TRUE -WIN32 = TRUE -COMMONMKFILE = hidapi.mk - -!include $(ROOT)\dev\master.mk - - -!ELSE - -# -# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source -# file to this component. This file merely indirects to the real make file -# that is shared by all the driver components of the Windows NT DDK -# - -!IF DEFINED(_NT_TARGET_VERSION) -! IF $(_NT_TARGET_VERSION)>=0x501 -! INCLUDE $(NTMAKEENV)\makefile.def -! ELSE -# Only warn once per directory -! INCLUDE $(NTMAKEENV)\makefile.plt -! IF "$(BUILD_PASS)"=="PASS1" -! message BUILDMSG: Warning : The sample "$(MAKEDIR)" is not valid for the current OS target. -! ENDIF -! ENDIF -!ELSE -! INCLUDE $(NTMAKEENV)\makefile.def -!ENDIF - -!ENDIF - diff --git a/lib/hidapi-0.8.0-pre/windows/ddk_build/sources b/lib/hidapi-0.8.0-pre/windows/ddk_build/sources deleted file mode 100644 index 7f06a0963e..0000000000 --- a/lib/hidapi-0.8.0-pre/windows/ddk_build/sources +++ /dev/null @@ -1,23 +0,0 @@ -TARGETNAME=hidapi -TARGETTYPE=DYNLINK -UMTYPE=console -UMENTRY=main - -MSC_WARNING_LEVEL=/W3 /WX - -TARGETLIBS=$(SDK_LIB_PATH)\hid.lib \ - $(SDK_LIB_PATH)\setupapi.lib \ - $(SDK_LIB_PATH)\kernel32.lib \ - $(SDK_LIB_PATH)\comdlg32.lib - -USE_MSVCRT=1 - -INCLUDES= ..\..\hidapi -SOURCES= ..\hid.c \ - - -TARGET_DESTINATION=retail - -MUI=0 -MUI_COMMENT="HID Interface DLL" - diff --git a/lib/hidapi-0.8.0-rc1/.gitattributes b/lib/hidapi-0.8.0-rc1/.gitattributes new file mode 100644 index 0000000000..edb79febc5 --- /dev/null +++ b/lib/hidapi-0.8.0-rc1/.gitattributes @@ -0,0 +1,7 @@ +* text=auto + +*.sln text eol=crlf +*.vcproj text eol=crlf + +bootstrap text eol=lf +configure.ac text eol=lf diff --git a/lib/hidapi-0.8.0-rc1/.gitignore b/lib/hidapi-0.8.0-rc1/.gitignore new file mode 100644 index 0000000000..b43ca58c25 --- /dev/null +++ b/lib/hidapi-0.8.0-rc1/.gitignore @@ -0,0 +1,20 @@ + +# Autotools-added generated files +Makefile.in +aclocal.m4 +autom4te.cache/ +config.* +configure +depcomp +install-sh +libusb/Makefile.in +linux/Makefile.in +ltmain.sh +mac/Makefile.in +missing +testgui/Makefile.in +windows/Makefile.in + +Makefile +stamp-h1 +libtool diff --git a/lib/hidapi-0.8.0-pre/AUTHORS.txt b/lib/hidapi-0.8.0-rc1/AUTHORS.txt index 7acafd78c3..7acafd78c3 100644 --- a/lib/hidapi-0.8.0-pre/AUTHORS.txt +++ b/lib/hidapi-0.8.0-rc1/AUTHORS.txt diff --git a/lib/hidapi-0.8.0-pre/HACKING.txt b/lib/hidapi-0.8.0-rc1/HACKING.txt index 761d4b6550..761d4b6550 100644 --- a/lib/hidapi-0.8.0-pre/HACKING.txt +++ b/lib/hidapi-0.8.0-rc1/HACKING.txt diff --git a/lib/hidapi-0.8.0-pre/LICENSE-bsd.txt b/lib/hidapi-0.8.0-rc1/LICENSE-bsd.txt index 538cdf95cf..538cdf95cf 100644 --- a/lib/hidapi-0.8.0-pre/LICENSE-bsd.txt +++ b/lib/hidapi-0.8.0-rc1/LICENSE-bsd.txt diff --git a/lib/hidapi-0.8.0-pre/LICENSE-gpl3.txt b/lib/hidapi-0.8.0-rc1/LICENSE-gpl3.txt index 94a9ed024d..94a9ed024d 100644 --- a/lib/hidapi-0.8.0-pre/LICENSE-gpl3.txt +++ b/lib/hidapi-0.8.0-rc1/LICENSE-gpl3.txt diff --git a/lib/hidapi-0.8.0-pre/LICENSE-orig.txt b/lib/hidapi-0.8.0-rc1/LICENSE-orig.txt index e3f3380829..e3f3380829 100644 --- a/lib/hidapi-0.8.0-pre/LICENSE-orig.txt +++ b/lib/hidapi-0.8.0-rc1/LICENSE-orig.txt diff --git a/lib/hidapi-0.8.0-pre/LICENSE.txt b/lib/hidapi-0.8.0-rc1/LICENSE.txt index e1676d4c42..e1676d4c42 100644 --- a/lib/hidapi-0.8.0-pre/LICENSE.txt +++ b/lib/hidapi-0.8.0-rc1/LICENSE.txt diff --git a/lib/hidapi-0.8.0-rc1/Makefile.am b/lib/hidapi-0.8.0-rc1/Makefile.am new file mode 100644 index 0000000000..cf4f7ca4c9 --- /dev/null +++ b/lib/hidapi-0.8.0-rc1/Makefile.am @@ -0,0 +1,77 @@ + +ACLOCAL_AMFLAGS = -I m4 + +if OS_FREEBSD +pkgconfigdir=$(prefix)/libdata/pkgconfig +else +pkgconfigdir=$(libdir)/pkgconfig +endif + +if OS_LINUX +pkgconfig_DATA=pc/hidapi-hidraw.pc pc/hidapi-libusb.pc +else +pkgconfig_DATA=pc/hidapi.pc +endif + +SUBDIRS= + +if OS_LINUX +SUBDIRS += linux libusb +endif + +if OS_DARWIN +SUBDIRS += mac +endif + +if OS_FREEBSD +SUBDIRS += libusb +endif + +if OS_WINDOWS +SUBDIRS += windows +endif + +SUBDIRS += hidtest + +if BUILD_TESTGUI +SUBDIRS += testgui +endif + +EXTRA_DIST = udev doxygen + +dist_doc_DATA = \ + README.txt \ + AUTHORS.txt \ + LICENSE-bsd.txt \ + LICENSE-gpl3.txt \ + LICENSE-orig.txt \ + LICENSE.txt + +SCMCLEAN_TARGETS= \ + aclocal.m4 \ + config.guess \ + config.sub \ + configure \ + config.h.in \ + depcomp \ + install-sh \ + ltmain.sh \ + missing \ + mac/Makefile.in \ + testgui/Makefile.in \ + libusb/Makefile.in \ + Makefile.in \ + linux/Makefile.in \ + windows/Makefile.in \ + m4/libtool.m4 \ + m4/lt~obsolete.m4 \ + m4/ltoptions.m4 \ + m4/ltsugar.m4 \ + m4/ltversion.m4 + +SCMCLEAN_DIR_TARGETS = \ + autom4te.cache + +scm-clean: distclean + rm -f $(SCMCLEAN_TARGETS) + rm -Rf $(SCMCLEAN_DIR_TARGETS) diff --git a/lib/hidapi-0.8.0-pre/README.txt b/lib/hidapi-0.8.0-rc1/README.txt index b4e7c0e0da..b4e7c0e0da 100644 --- a/lib/hidapi-0.8.0-pre/README.txt +++ b/lib/hidapi-0.8.0-rc1/README.txt diff --git a/lib/hidapi-0.8.0-rc1/bootstrap b/lib/hidapi-0.8.0-rc1/bootstrap new file mode 100755 index 0000000000..81e9b74b61 --- /dev/null +++ b/lib/hidapi-0.8.0-rc1/bootstrap @@ -0,0 +1,2 @@ +#!/bin/sh -x +autoreconf --install --verbose --force diff --git a/lib/hidapi-0.8.0-rc1/configure.ac b/lib/hidapi-0.8.0-rc1/configure.ac new file mode 100644 index 0000000000..e5fdd4beba --- /dev/null +++ b/lib/hidapi-0.8.0-rc1/configure.ac @@ -0,0 +1,224 @@ +AC_PREREQ(2.63) + +# Version number. This is currently the only place. +m4_define([HIDAPI_MAJOR], 0) +m4_define([HIDAPI_MINOR], 8) +m4_define([HIDAPI_RELEASE], 0) +m4_define([HIDAPI_RC], -rc1) +m4_define([VERSION_STRING], HIDAPI_MAJOR[.]HIDAPI_MINOR[.]HIDAPI_RELEASE[]HIDAPI_RC) + +AC_INIT([hidapi],[VERSION_STRING],[alan@signal11.us]) + +# Library soname version +# Follow the following rules (particularly the ones in the second link): +# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html +# http://sourceware.org/autobook/autobook/autobook_91.html +lt_current="0" +lt_revision="0" +lt_age="0" +LTLDFLAGS="-version-info ${lt_current}:${lt_revision}:${lt_age}" + +AC_CONFIG_MACRO_DIR([m4]) +AM_INIT_AUTOMAKE([foreign -Wall -Werror]) +AC_CONFIG_MACRO_DIR([m4]) + +m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) +LT_INIT + +AC_PROG_CC +AC_PROG_CXX +AC_PROG_OBJC +PKG_PROG_PKG_CONFIG + + +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +hidapi_lib_error() { + echo "" + echo " Library $1 was not found on this system." + echo " Please install it and re-run ./configure" + echo "" + exit 1 +} + +hidapi_prog_error() { + echo "" + echo " Program $1 was not found on this system." + echo " This program is part of $2." + echo " Please install it and re-run ./configure" + echo "" + exit 1 +} + +AC_MSG_CHECKING([operating system]) +AC_MSG_RESULT($host) +case $host in +*-linux*) + AC_MSG_RESULT([ (Linux back-end)]) + AC_DEFINE(OS_LINUX, 1, [Linux implementations]) + AC_SUBST(OS_LINUX) + backend="linux" + os="linux" + threads="pthreads" + + # HIDAPI/hidraw libs + PKG_CHECK_MODULES([libudev], [libudev], true, [hidapi_lib_error libudev]) + LIBS_HIDRAW_PR+=" $libudev_LIBS" + CFLAGS_HIDRAW+=" $libudev_CFLAGS" + + # HIDAPI/libusb libs + AC_CHECK_LIB([rt], [clock_gettime], [LIBS_LIBUSB_PRIVATE+=" -lrt"], [hidapi_lib_error librt]) + PKG_CHECK_MODULES([libusb], [libusb-1.0 >= 1.0.9], true, [hidapi_lib_error libusb-1.0]) + LIBS_LIBUSB_PRIVATE+=" $libusb_LIBS" + CFLAGS_LIBUSB+=" $libusb_CFLAGS" + ;; +*-darwin*) + AC_MSG_RESULT([ (Mac OS X back-end)]) + AC_DEFINE(OS_DARWIN, 1, [Mac implementation]) + AC_SUBST(OS_DARWIN) + backend="mac" + os="darwin" + threads="pthreads" + LIBS="${LIBS} -framework IOKit -framework CoreFoundation" + ;; +*-freebsd*) + AC_MSG_RESULT([ (FreeBSD back-end)]) + AC_DEFINE(OS_FREEBSD, 1, [FreeBSD implementation]) + AC_SUBST(OS_FREEBSD) + backend="libusb" + os="freebsd" + threads="pthreads" + + CFLAGS="$CFLAGS -I/usr/local/include" + LDFLAGS="$LDFLAGS -L/usr/local/lib" + LIBS="${LIBS}" + AC_CHECK_LIB([usb], [libusb_init], [LIBS_LIBUSB_PRIVATE="${LIBS_LIBUSB_PRIVATE} -lusb"], [hidapi_lib_error libusb]) + AC_CHECK_LIB([iconv], [iconv_open], [LIBS_LIBUSB_PRIVATE="${LIBS_LIBUSB_PRIVATE} -liconv"], [hidapi_lib_error libiconv]) + echo libs_priv: $LIBS_LIBUSB_PRIVATE + ;; +*-mingw*) + AC_MSG_RESULT([ (Windows back-end, using MinGW)]) + backend="windows" + os="windows" + threads="windows" + win_implementation="mingw" + ;; +*-cygwin*) + AC_MSG_RESULT([ (Windows back-end, using Cygwin)]) + backend="windows" + os="windows" + threads="windows" + win_implementation="cygwin" + ;; +*) + AC_MSG_ERROR([HIDAPI is not supported on your operating system yet]) +esac + +LIBS_HIDRAW="${LIBS} ${LIBS_HIDRAW_PR}" +LIBS_LIBUSB="${LIBS} ${LIBS_LIBUSB_PRIVATE}" +AC_SUBST([LIBS_HIDRAW]) +AC_SUBST([LIBS_LIBUSB]) +AC_SUBST([CFLAGS_LIBUSB]) +AC_SUBST([CFLAGS_HIDRAW]) + +if test "x$os" = xwindows; then + AC_DEFINE(OS_WINDOWS, 1, [Windows implementations]) + AC_SUBST(OS_WINDOWS) + LDFLAGS="${LDFLAGS} -no-undefined" + LIBS="${LIBS} -lsetupapi" +fi + +if test "x$threads" = xpthreads; then + AX_PTHREAD([found_pthreads=yes], [found_pthreads=no]) + + if test "x$found_pthreads" = xyes; then + if test "x$os" = xlinux; then + # Only use pthreads for libusb implementation on Linux. + LIBS_LIBUSB="$PTHREAD_LIBS $LIBS_LIBUSB" + CFLAGS_LIBUSB="$CFLAGS_LIBUSB $PTHREAD_CFLAGS" + # There's no separate CC on Linux for threading, + # so it's ok that both implementations use $PTHREAD_CC + CC="$PTHREAD_CC" + else + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + CC="$PTHREAD_CC" + fi + fi +fi + +# Test GUI +AC_ARG_ENABLE([testgui], + [AS_HELP_STRING([--enable-testgui], + [enable building of test GUI (default n)])], + [testgui_enabled=$enableval], + [testgui_enabled='no']) +AM_CONDITIONAL([BUILD_TESTGUI], [test "x$testgui_enabled" != "xno"]) + +# Configure the MacOS TestGUI app bundle +rm -Rf testgui/TestGUI.app +mkdir -p testgui/TestGUI.app +cp -R ${srcdir}/testgui/TestGUI.app.in/* testgui/TestGUI.app +chmod -R u+w testgui/TestGUI.app +mkdir testgui/TestGUI.app/Contents/MacOS/ + +if test "x$testgui_enabled" != "xno"; then + if test "x$os" = xdarwin; then + # On Mac OS, don't use pkg-config. + AC_CHECK_PROG([foxconfig], [fox-config], [fox-config], false) + if test "x$foxconfig" = "xfalse"; then + hidapi_prog_error fox-config "FOX Toolkit" + fi + LIBS_TESTGUI+=`$foxconfig --libs` + LIBS_TESTGUI+=" -framework Cocoa -L/usr/X11R6/lib" + CFLAGS_TESTGUI+=`$foxconfig --cflags` + OBJCFLAGS+=" -x objective-c++" + elif test "x$os" = xwindows; then + # On Windows, just set the paths for Fox toolkit + if test "x$win_implementation" = xmingw; then + CFLAGS_TESTGUI="-I\$(srcdir)/../../hidapi-externals/fox/include -g -c" + LIBS_TESTGUI=" -mwindows \$(srcdir)/../../hidapi-externals/fox/lib/libFOX-1.6.a -lgdi32 -Wl,--enable-auto-import -static-libgcc -static-libstdc++ -lkernel32" + else + # Cygwin + CFLAGS_TESTGUI="-DWIN32 -I\$(srcdir)/../../hidapi-externals/fox/include -g -c" + LIBS_TESTGUI="\$(srcdir)/../../hidapi-externals/fox/lib/libFOX-cygwin-1.6.a -lgdi32 -Wl,--enable-auto-import -static-libgcc -static-libstdc++ -lkernel32" + fi + else + # On Linux and FreeBSD platforms, use pkg-config to find fox. + PKG_CHECK_MODULES([fox], [fox]) + LIBS_TESTGUI="${LIBS_TESTGUI} $fox_LIBS" + if test "x$os" = xfreebsd; then + LIBS_TESTGUI="${LIBS_TESTGUI} -L/usr/local/lib" + fi + CFLAGS_TESTGUI="${CFLAGS_TESTGUI} $fox_CFLAGS" + fi +fi +AC_SUBST([LIBS_TESTGUI]) +AC_SUBST([CFLAGS_TESTGUI]) +AC_SUBST([backend]) + +# OS info for Automake +AM_CONDITIONAL(OS_LINUX, test "x$os" = xlinux) +AM_CONDITIONAL(OS_DARWIN, test "x$os" = xdarwin) +AM_CONDITIONAL(OS_FREEBSD, test "x$os" = xfreebsd) +AM_CONDITIONAL(OS_WINDOWS, test "x$os" |