1 --- skalibs-2.3.10.0.orig/configure 2016-03-19 16:04:58.000000000 +0100
2 +++ skalibs-2.3.10.0/configure 2016-09-03 17:23:41.494368249 +0200
3 @@ -154,10 +154,28 @@ choose () {
6 echo "Checking size of $3..."
7 - $CC_AUTO $CPPFLAGS_AUTO $CFLAGS_AUTO $LDFLAGS_AUTO -o trysizeof$1 src/sysdeps/trysizeof$1.c
8 - type_size=$(./trysizeof$1) || fail "$0: unable to determine size of $3"
12 + cat<<EOF>trysizeof$1.c
13 +#include <sys/types.h>
17 + static int v = 1 / !!((sizeof($3) == $type_size));
21 + if $CC_AUTO $CPPFLAGS_AUTO $CFLAGS_AUTO $LDFLAGS_AUTO -o trysizeof$1 trysizeof$1.c 2>/dev/null; then
25 + type_size=$(expr $type_size + 1)
26 + test $type_size -le 16 || break
28 + test $r = true || fail "$0: unable to determine size of $3"
29 type_bits=$(expr 8 \* $type_size)
31 + rm -f trysizeof$1 trysizeof$1.c
32 echo "sizeof$1: $type_size" >> $sysdeps/sysdeps
33 echo "#define ${package_macro_name}_SIZEOF$2 $type_size" >> $sysdeps/sysdeps.h
34 echo "#define ${package_macro_name}_$2_BITS $type_bits" >> $sysdeps/sysdeps.h
35 @@ -451,12 +469,20 @@ EOF
38 echo "Checking system endianness..."
39 - $CC_AUTO $CPPFLAGS_AUTO $CFLAGS_AUTO -o tryendianness src/sysdeps/tryendianness.c
40 - endianness=$(./tryendianness) || fail "$0: unable to determine endianness"
41 + if $CC_AUTO $CPPFLAGS_AUTO $CFLAGS_AUTO -o trybigendian src/sysdeps/trybigendian.c 2>/dev/null; then
44 + if $CC_AUTO $CPPFLAGS_AUTO $CFLAGS_AUTO -o trylittleendian src/sysdeps/trylittleendian.c 2>/dev/null; then
47 + fail "$0: unable to determine endianness"
51 echo "endianness: $endianness" >> $sysdeps/sysdeps
52 echo "#define ${package_macro_name}_ENDIANNESS \"$endianness\"" >> $sysdeps/sysdeps.h
53 echo " ... $endianness"
55 + rm -f trybigendian trylittleendian
57 trytypesize ushort USHORT "unsigned short"
58 trytypesize uint UINT "unsigned int"