diff --git a/autogen.sh b/autogen.sh index 9bd27bfa..12d92672 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,6 +1,6 @@ #! /bin/sh rm -rf Makefile aclocal.m4 config.guess config.h.in* config.sub configure depcomp install-sh install.sh ltmain.sh missing autom4te.cache -find -name Makefile.in -exec rm {} \; +find . -name Makefile.in -exec rm {} \; autoreconf -i -f #depcom is not added to DIST_COMMON by the previous run of automake, strange diff --git a/daemons/input_map.sh b/daemons/input_map.sh index 77829b97..51aae202 100755 --- a/daemons/input_map.sh +++ b/daemons/input_map.sh @@ -3,7 +3,14 @@ TYPES="KEY BTN" file=${1:-/usr/include/linux/input.h} +# Use gnu-sed on Macosx +if test `uname` == "Darwin"; then + SED=gsed +else + SED=sed +fi + for type in $TYPES; do - grep "^#define ${type}_" < $file|sort|sed -n --expression="s/^#define \([^ ]*\)[ ][ ]*\([0-9][0-9a-fA-FxX]*\).*/{\"\1\", \2},/p" + grep "^#define ${type}_" < $file|sort|$SED -n --expression="s/^#define \([^ ]*\)[ ][ ]*\([0-9][0-9a-fA-FxX]*\).*/{\"\1\", \2},/p" done diff --git a/daemons/ir_remote_types.h b/daemons/ir_remote_types.h index 5cd16a89..e6e9853f 100644 --- a/daemons/ir_remote_types.h +++ b/daemons/ir_remote_types.h @@ -14,7 +14,20 @@ #ifndef IR_REMOTE_TYPES_H #define IR_REMOTE_TYPES_H +#if defined(__linux__) #include +#else +#include +typedef int8_t __s8; +typedef uint8_t __u8; +typedef int16_t __s16; +typedef uint16_t __u16; +typedef int32_t __s32; +typedef uint32_t __u32; +typedef int64_t __s64; +typedef uint64_t __u64; +#endif + #include #include #include diff --git a/daemons/lircmd.c b/daemons/lircmd.c index 411aebcd..35a24389 100644 --- a/daemons/lircmd.c +++ b/daemons/lircmd.c @@ -35,6 +35,16 @@ #if defined(__linux__) #include #include +#else +#include +typedef int8_t __s8; +typedef uint8_t __u8; +typedef int16_t __s16; +typedef uint16_t __u16; +typedef int32_t __s32; +typedef uint32_t __u32; +typedef int64_t __s64; +typedef uint64_t __u64; #endif #define CLICK_DELAY 50000 /* usecs */ diff --git a/setup-functions.sh b/setup-functions.sh index 901bf907..40a7d36f 100755 --- a/setup-functions.sh +++ b/setup-functions.sh @@ -1,3 +1,10 @@ +# Use gnu-sed on Macosx +if test `uname` == "Darwin"; then + SED=gsed +else + SED=sed +fi + setup_seq_init() { local INDEX=1 local N @@ -24,7 +31,7 @@ query_setup_data() { local INDEXES="" local NAME TEMP=$(mktemp /tmp/lirc.XXXXXXXXXX) - FULL_ENTRY=$(sed -n \ + FULL_ENTRY=$($SED -n \ -e ': start' \ -e 's/\\[ ]*$//' \ -e 't more' \ @@ -37,7 +44,7 @@ query_setup_data() { -e '/^[ ]*#/d' \ -e "/^$QUESTION:.* $DEVICE\>\([^-]\|$\)/,/^ *$/p" \ ${SETUP_DATA}) - HACKED_ENTRY=$(echo "$FULL_ENTRY" | sed \ + HACKED_ENTRY=$(echo "$FULL_ENTRY" | $SED \ -e "/^$QUESTION:/d" \ -e '/^ *$/d' \ -e 's/^[ ]*//' \ @@ -142,7 +149,7 @@ EOF fi fi echo -n 'LIRC_DRIVER='"${NAME}; " - if [ "$(expr length "$NAME")" -lt 8 ]; then + if [ ${#NAME} -lt 8 ]; then echo -n " " fi echo 'DRIVER_PARAMETER='"$DEF_PARAM;" \