From 18fe972665f5e197ad7c120a17f445ca2a20890d Mon Sep 17 00:00:00 2001 From: Jonathan Wilkes <jon.w.wilkes@gmail.com> Date: Tue, 20 Oct 2015 18:07:55 -0400 Subject: [PATCH] port from pd-l2ork git: commit 225e3302fab94abda5d260af1ae79cc5bcc089dc *updated cwiid to version 0.7.00 (note: left out a file in the hidden .svn folder) --- l2ork_addons/cwiid/NEWS | 5 + l2ork_addons/cwiid/README | 1 + l2ork_addons/cwiid/common/include/config.h | 6 +- l2ork_addons/cwiid/configure | 243 ++++++++++--------- l2ork_addons/cwiid/configure.ac | 5 +- l2ork_addons/cwiid/libcwiid/command.c | 11 +- l2ork_addons/cwiid/libcwiid/connect.c | 5 + l2ork_addons/cwiid/libcwiid/cwiid.h | 6 + l2ork_addons/cwiid/libcwiid/cwiid.pc | 2 +- l2ork_addons/cwiid/libcwiid/cwiid_internal.h | 10 +- l2ork_addons/cwiid/libcwiid/interface.c | 6 + l2ork_addons/cwiid/libcwiid/process.c | 10 +- l2ork_addons/cwiid/libcwiid/state.c | 6 + l2ork_addons/cwiid/libcwiid/thread.c | 5 + l2ork_addons/cwiid/libcwiid/util.c | 9 + l2ork_addons/cwiid/python/setup.py | 2 +- l2ork_addons/cwiid/wmgui/Makefile | 4 +- 17 files changed, 202 insertions(+), 134 deletions(-) diff --git a/l2ork_addons/cwiid/NEWS b/l2ork_addons/cwiid/NEWS index d884e1f48..55b3dbb79 100644 --- a/l2ork_addons/cwiid/NEWS +++ b/l2ork_addons/cwiid/NEWS @@ -1,3 +1,8 @@ +0.7.00 + - final version supporting all Nintendo brand wiimotes and extensions + - support for Wii balance board, motion plus, and wii motionplus inside + - passthrough mode and bunch of other improvements + 0.6.00 - renamed libwiimote to libcwiid to avoid naming conflict with other projects - rewrite of libcwiid architecture diff --git a/l2ork_addons/cwiid/README b/l2ork_addons/cwiid/README index 52a52eb4e..db4299aef 100644 --- a/l2ork_addons/cwiid/README +++ b/l2ork_addons/cwiid/README @@ -1,4 +1,5 @@ Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org> +Copyright (C) 2011-2015 Ivica Ico Bukvic <ico@vt.edu> and Deba Pratim Saha <dpsaha@vt.edu> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/l2ork_addons/cwiid/common/include/config.h b/l2ork_addons/cwiid/common/include/config.h index 467988a9d..ffea608ca 100644 --- a/l2ork_addons/cwiid/common/include/config.h +++ b/l2ork_addons/cwiid/common/include/config.h @@ -47,19 +47,19 @@ #define HAVE_UNISTD_H 1 /* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "cwiid@abstrakraft.org" +#define PACKAGE_BUGREPORT "ico@vt.edu" /* Define to the full name of this package. */ #define PACKAGE_NAME "CWiid" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "CWiid 0.6.00" +#define PACKAGE_STRING "CWiid 0.7.00" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "cwiid" /* Define to the version of this package. */ -#define PACKAGE_VERSION "0.6.00" +#define PACKAGE_VERSION "0.7.00" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 diff --git a/l2ork_addons/cwiid/configure b/l2ork_addons/cwiid/configure index 7fb60deb6..ec76e43ce 100755 --- a/l2ork_addons/cwiid/configure +++ b/l2ork_addons/cwiid/configure @@ -1,13 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for CWiid 0.6.00. +# Generated by GNU Autoconf 2.69 for CWiid 0.7.00. # -# Report bugs to <cwiid@abstrakraft.org>. +# Report bugs to <ico@vt.edu>. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -136,6 +134,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -169,7 +192,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -214,21 +238,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -238,11 +266,10 @@ fi $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: cwiid@abstrakraft.org about your system, including any -$0: error possibly output before this message. Then install -$0: a modern shell, or manually run the script under such a -$0: shell if you do have one." + $as_echo "$0: Please tell bug-autoconf@gnu.org and ico@vt.edu about +$0: your system, including any error possibly output before +$0: this message. Then install a modern shell, or manually +$0: run the script under such a shell if you do have one." fi exit 1 fi @@ -331,6 +358,14 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -452,6 +487,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -486,16 +525,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -507,28 +546,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -560,9 +579,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='CWiid' PACKAGE_TARNAME='cwiid' -PACKAGE_VERSION='0.6.00' -PACKAGE_STRING='CWiid 0.6.00' -PACKAGE_BUGREPORT='cwiid@abstrakraft.org' +PACKAGE_VERSION='0.7.00' +PACKAGE_STRING='CWiid 0.7.00' +PACKAGE_BUGREPORT='ico@vt.edu' PACKAGE_URL='' # Factoring default headers for most tests. @@ -1146,8 +1165,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1233,7 +1250,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures CWiid 0.6.00 to adapt to many kinds of systems. +\`configure' configures CWiid 0.7.00 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1294,7 +1311,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of CWiid 0.6.00:";; + short | recursive ) echo "Configuration of CWiid 0.7.00:";; esac cat <<\_ACEOF @@ -1335,7 +1352,7 @@ Some influential environment variables: Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to <cwiid@abstrakraft.org>. +Report bugs to <ico@vt.edu>. _ACEOF ac_status=$? fi @@ -1398,10 +1415,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -CWiid configure 0.6.00 -generated by GNU Autoconf 2.68 +CWiid configure 0.7.00 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1477,7 +1494,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1645,9 +1662,9 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ------------------------------------ ## -## Report this to cwiid@abstrakraft.org ## -## ------------------------------------ ##" +( $as_echo "## ------------------------- ## +## Report this to ico@vt.edu ## +## ------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac @@ -1700,8 +1717,8 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by CWiid $as_me 0.6.00, which was -generated by GNU Autoconf 2.68. Invocation command line was +It was created by CWiid $as_me 0.7.00, which was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2073,7 +2090,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2113,7 +2130,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2166,7 +2183,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2207,7 +2224,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2265,7 +2282,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2309,7 +2326,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2755,8 +2772,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdarg.h> #include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -2859,7 +2875,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2902,7 +2918,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LEX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2934,7 +2950,8 @@ a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } -e { yyless (input () != 0); } +e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ + yyless ((input () != 0)); } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% @@ -3066,7 +3083,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_YACC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3135,7 +3152,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PYTHON="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3470,7 +3487,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -3536,7 +3553,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -3887,7 +3904,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3930,7 +3947,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4483,16 +4500,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -4552,28 +4569,16 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -4594,8 +4599,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by CWiid $as_me 0.6.00, which was -generated by GNU Autoconf 2.68. Invocation command line was +This file was extended by CWiid $as_me 0.7.00, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -4650,17 +4655,17 @@ $config_files Configuration headers: $config_headers -Report bugs to <cwiid@abstrakraft.org>." +Report bugs to <ico@vt.edu>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -CWiid config.status 0.6.00 -configured by $0, generated by GNU Autoconf 2.68, +CWiid config.status 0.7.00 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -4749,7 +4754,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' diff --git a/l2ork_addons/cwiid/configure.ac b/l2ork_addons/cwiid/configure.ac index cae2967a7..291688777 100644 --- a/l2ork_addons/cwiid/configure.ac +++ b/l2ork_addons/cwiid/configure.ac @@ -1,4 +1,7 @@ # ChangeLog: +# 2015-09-17 Ivica Ico Bukvic <ico@vt.edu> +# * updated version and contact info +# # 2007-07-28 L. Donnie Smith <cwiid@abstrakraft.org> # * added config.h header # * added with-python argument and associated logic @@ -24,7 +27,7 @@ # * Initial ChangeLog # * Check for stdint.h -AC_INIT(CWiid,0.6.00,cwiid@abstrakraft.org) +AC_INIT(CWiid,0.7.00,ico@vt.edu) AC_CONFIG_HEADER(common/include/config.h) AC_PROG_CC diff --git a/l2ork_addons/cwiid/libcwiid/command.c b/l2ork_addons/cwiid/libcwiid/command.c index e6191de06..24d3adb1d 100644 --- a/l2ork_addons/cwiid/libcwiid/command.c +++ b/l2ork_addons/cwiid/libcwiid/command.c @@ -15,6 +15,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ChangeLog: + * 2015-09-17 Ivica Ico Bukvic <ico@vt.edu> + * * Added Wii MotionPlus Inside support, thereby completing support for all known Wii devices + * * Version bump to 0.7.00 + * * Updated build and contact info + * * 2012-04-11 Deba Pratim Saha <dpsaha@vt.edu> and Ivica Ico Bukvic <ico@vt.edu> * * implemented passthrough toggle * * implemented Mplus + Nunchuk passthrough support @@ -100,14 +105,14 @@ int cwiid_send_rpt(cwiid_wiimote_t *wiimote, uint8_t flags, uint8_t report, buf[2] |= wiimote->state.rumble; } - if (write(wiimote->ctl_socket, buf, len+2) != (ssize_t)(len+2)) { + if (write(wiimote->int_socket, buf, len+2) != (ssize_t)(len+2)) { free(buf); return -1; } - else if (verify_handshake(wiimote)) { + /*else if (verify_handshake(wiimote)) { free(buf); return -1; - } + }*/ return 0; } diff --git a/l2ork_addons/cwiid/libcwiid/connect.c b/l2ork_addons/cwiid/libcwiid/connect.c index fa39df8df..4d4087425 100644 --- a/l2ork_addons/cwiid/libcwiid/connect.c +++ b/l2ork_addons/cwiid/libcwiid/connect.c @@ -15,6 +15,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ChangeLog: + * 2015-09-17 Ivica Ico Bukvic <ico@vt.edu> + * * Added Wii MotionPlus Inside support, thereby completing support for all known Wii devices + * * Version bump to 0.7.00 + * * Updated build and contact info + * * 2012-04-11 Deba Pratim Saha <dpsaha@vt.edu> and Ivica Ico Bukvic <ico@vt.edu> * * implemented passthrough toggle * * implemented Mplus + Nunchuk passthrough support diff --git a/l2ork_addons/cwiid/libcwiid/cwiid.h b/l2ork_addons/cwiid/libcwiid/cwiid.h index 7e843d233..52893b2fe 100644 --- a/l2ork_addons/cwiid/libcwiid/cwiid.h +++ b/l2ork_addons/cwiid/libcwiid/cwiid.h @@ -1,4 +1,5 @@ /* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org> + * Copyright (C) 2011-2015 Ivica Ico Bukvic <ico@vt.edu> and Deba Pratim Saha <dpsaha@vt.edu> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,6 +16,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ChangeLog: + * 2015-09-17 Ivica Ico Bukvic <ico@vt.edu> + * * Added Wii MotionPlus Inside support, thereby completing support for all known Wii devices + * * Version bump to 0.7.00 + * * Updated build and contact info + * * 2012-04-11 Deba Pratim Saha <dpsaha@vt.edu> and Ivica Ico Bukvic <ico@vt.edu> * * implemented passthrough toggle * * implemented Mplus + Nunchuk passthrough support diff --git a/l2ork_addons/cwiid/libcwiid/cwiid.pc b/l2ork_addons/cwiid/libcwiid/cwiid.pc index 99f3834b9..f0333e964 100644 --- a/l2ork_addons/cwiid/libcwiid/cwiid.pc +++ b/l2ork_addons/cwiid/libcwiid/cwiid.pc @@ -8,7 +8,7 @@ cwiid_plugins_dir=${libdir}/cwiid/plugins Name: CWiid Description: CWiid Wiimote Interface -Version: 0.6.00 +Version: 0.7.00 Requires: bluez Libs: -L${libdir} -lcwiid Cflags: -I${includedir} diff --git a/l2ork_addons/cwiid/libcwiid/cwiid_internal.h b/l2ork_addons/cwiid/libcwiid/cwiid_internal.h index fe1e96dff..0a3b1f10e 100644 --- a/l2ork_addons/cwiid/libcwiid/cwiid_internal.h +++ b/l2ork_addons/cwiid/libcwiid/cwiid_internal.h @@ -1,4 +1,5 @@ /* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org> + * Copyright (C) 2011-2015 Ivica Ico Bukvic <ico@vt.edu> and Deba Pratim Saha <dpsaha@vt.edu> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,6 +16,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ChangeLog: + * 2015-09-17 Ivica Ico Bukvic <ico@vt.edu> + * * Added Wii MotionPlus Inside support, thereby completing support for all known Wii devices + * * Version bump to 0.7.00 + * * Updated build and contact info + * * 2012-04-11 Deba Pratim Saha <dpsaha@vt.edu> and Ivica Ico Bukvic <ico@vt.edu> * * implemented passthrough toggle * * implemented Mplus + Nunchuk passthrough support @@ -59,7 +65,7 @@ /* Bluetooth magic numbers */ #define BT_TRANS_MASK 0xF0 #define BT_TRANS_HANDSHAKE 0x00 -#define BT_TRANS_SET_REPORT 0x50 +#define BT_TRANS_SET_REPORT 0xA0 #define BT_TRANS_DATA 0xA0 #define BT_TRANS_DATAC 0xB0 @@ -226,7 +232,7 @@ void *mesg_callback_thread(struct wiimote *wiimote); /* util.c */ void cwiid_err(struct wiimote *wiimote, const char *str, ...); -int verify_handshake(struct wiimote *wiimote); +//int verify_handshake(struct wiimote *wiimote); int exec_write_seq(struct wiimote *wiimote, unsigned int len, struct write_seq *seq); int full_read(int fd, void *buf, size_t len); diff --git a/l2ork_addons/cwiid/libcwiid/interface.c b/l2ork_addons/cwiid/libcwiid/interface.c index 8b61fcb94..9296678e2 100644 --- a/l2ork_addons/cwiid/libcwiid/interface.c +++ b/l2ork_addons/cwiid/libcwiid/interface.c @@ -1,4 +1,5 @@ /* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org> + * Copyright (C) 2011-2015 Ivica Ico Bukvic <ico@vt.edu> and Deba Pratim Saha <dpsaha@vt.edu> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,6 +16,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ChangeLog: + * 2015-09-17 Ivica Ico Bukvic <ico@vt.edu> + * * Added Wii MotionPlus Inside support, thereby completing support for all known Wii devices + * * Version bump to 0.7.00 + * * Updated build and contact info + * * 2012-04-11 Deba Pratim Saha <dpsaha@vt.edu> and Ivica Ico Bukvic <ico@vt.edu> * * implemented passthrough toggle * * implemented Mplus + Nunchuk passthrough support diff --git a/l2ork_addons/cwiid/libcwiid/process.c b/l2ork_addons/cwiid/libcwiid/process.c index 31c8f1fd3..b088eecb7 100644 --- a/l2ork_addons/cwiid/libcwiid/process.c +++ b/l2ork_addons/cwiid/libcwiid/process.c @@ -1,4 +1,5 @@ /* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org> + * Copyright (C) 2011-2015 Ivica Ico Bukvic <ico@vt.edu> and Deba Pratim Saha <dpsaha@vt.edu> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,6 +16,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ChangeLog: + * 2015-09-17 Ivica Ico Bukvic <ico@vt.edu> + * * Added Wii MotionPlus Inside support, thereby completing support for all known Wii devices + * * Version bump to 0.7.00 + * * Updated build and contact info + * * 2012-11-01 Ivica Ico Bukvic <ico@vt.edu> * * fixed passthrough mode nunchuk button reporting values to be consistent with non-passthrough mode * @@ -370,7 +376,7 @@ int process_write(struct wiimote *wiimote, unsigned char *data) if (wiimote->rw_status != RW_WRITE) { cwiid_err(wiimote, "Received unexpected write report %d", wiimote->rw_status); - return -1; + //return -1; } rw_mesg.type = RW_WRITE; @@ -379,7 +385,7 @@ int process_write(struct wiimote *wiimote, unsigned char *data) if (write(wiimote->rw_pipe[1], &rw_mesg, sizeof rw_mesg) != sizeof rw_mesg) { cwiid_err(wiimote, "RW pipe write error"); - return -1; + //return -1; } return 0; diff --git a/l2ork_addons/cwiid/libcwiid/state.c b/l2ork_addons/cwiid/libcwiid/state.c index e952cc625..d8aedafb8 100644 --- a/l2ork_addons/cwiid/libcwiid/state.c +++ b/l2ork_addons/cwiid/libcwiid/state.c @@ -1,4 +1,5 @@ /* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org> + * Copyright (C) 2011-2015 Ivica Ico Bukvic <ico@vt.edu> and Deba Pratim Saha <dpsaha@vt.edu> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,6 +16,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ChangeLog: + * 2015-09-17 Ivica Ico Bukvic <ico@vt.edu> + * * Added Wii MotionPlus Inside support, thereby completing support for all known Wii devices + * * Version bump to 0.7.00 + * * Updated build and contact info + * * 2012-04-11 Deba Pratim Saha <dpsaha@vt.edu> and Ivica Ico Bukvic <ico@vt.edu> * * implemented passthrough toggle * * implemented Mplus + Nunchuk passthrough support diff --git a/l2ork_addons/cwiid/libcwiid/thread.c b/l2ork_addons/cwiid/libcwiid/thread.c index bd4f44893..5c8ce0b71 100644 --- a/l2ork_addons/cwiid/libcwiid/thread.c +++ b/l2ork_addons/cwiid/libcwiid/thread.c @@ -1,4 +1,5 @@ /* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org> + * Copyright (C) 2011-2015 Ivica Ico Bukvic <ico@vt.edu> and Deba Pratim Saha <dpsaha@vt.edu> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,6 +16,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ChangeLog: + * 2015-09-17 Ivica Ico Bukvic <ico@vt.edu> + * * Added Wii MotionPlus Inside support, thereby completing support for all known Wii devices + * * Version bump to 0.7.00 + * * Updated build and contact info * * 2012-11-01 Ivica Ico Bukvic <ico@vt.edu> * * fixed segfault when trying to toggle passthrough mode with wiimote disconnected diff --git a/l2ork_addons/cwiid/libcwiid/util.c b/l2ork_addons/cwiid/libcwiid/util.c index a7b8b3a89..5579e82ed 100644 --- a/l2ork_addons/cwiid/libcwiid/util.c +++ b/l2ork_addons/cwiid/libcwiid/util.c @@ -1,4 +1,5 @@ /* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org> + * Copyright (C) 2011-2015 Ivica Ico Bukvic <ico@vt.edu> and Deba Pratim Saha <dpsaha@vt.edu> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,6 +16,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ChangeLog: + * 2015-09-17 Ivica Ico Bukvic <ico@vt.edu> + * * Added Wii MotionPlus Inside support, thereby completing support for all known Wii devices + * * Version bump to 0.7.00 + * * Updated build and contact info + * * 2008-08-14 L. Donnie Smith <cwiid@abstrakraft.org> * * make cwiid_err_default public * * clean up cwiid_err @@ -88,8 +94,10 @@ void cwiid_err(struct wiimote *wiimote, const char *str, ...) } } +/* int verify_handshake(struct wiimote *wiimote) { + // disabled because we don't use ctl_socket any more unsigned char handshake; if (read(wiimote->ctl_socket, &handshake, 1) != 1) { cwiid_err(wiimote, "Socket read error (handshake)"); @@ -106,6 +114,7 @@ int verify_handshake(struct wiimote *wiimote) return 0; } +*/ int exec_write_seq(struct wiimote *wiimote, unsigned int len, struct write_seq *seq) diff --git a/l2ork_addons/cwiid/python/setup.py b/l2ork_addons/cwiid/python/setup.py index 4916eb7b5..cb0b1d9d3 100644 --- a/l2ork_addons/cwiid/python/setup.py +++ b/l2ork_addons/cwiid/python/setup.py @@ -1,6 +1,6 @@ from distutils.core import setup, Extension setup(name='cwiid', - version='0.6.00', + version='0.7.00', ext_modules=[Extension('cwiid', ['cwiidmodule.c', 'Wiimote.c'])] ) diff --git a/l2ork_addons/cwiid/wmgui/Makefile b/l2ork_addons/cwiid/wmgui/Makefile index 20a5080e6..ab768df6d 100644 --- a/l2ork_addons/cwiid/wmgui/Makefile +++ b/l2ork_addons/cwiid/wmgui/Makefile @@ -6,9 +6,9 @@ APP_NAME = wmgui SOURCES = main.c interface.c support.c -CFLAGS += -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I../libcwiid +CFLAGS += -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/harfbuzz -I../libcwiid LDFLAGS += -L../libcwiid -LDLIBS += -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lm -lcwiid -lbluetooth +LDLIBS += -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lfreetype -lgthread-2.0 -lglib-2.0 -lm -lcwiid -lbluetooth INST_DIR = ${exec_prefix}/bin include $(COMMON)/include/app.mak -- GitLab