|
Revision 2, 1.9 kB
(checked in by jordi, 3 years ago)
|
|
Added the initial source layout with autotools and gettext support. Still no code for the project.
|
| Line | |
|---|
| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | AC_DEFUN([gl_SIZE_MAX], |
|---|
| 10 | [ |
|---|
| 11 | AC_CHECK_HEADERS(stdint.h) |
|---|
| 12 | |
|---|
| 13 | AC_MSG_CHECKING([for SIZE_MAX]) |
|---|
| 14 | result= |
|---|
| 15 | AC_EGREP_CPP([Found it], [ |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | Found it |
|---|
| 22 | |
|---|
| 23 | ], result=yes) |
|---|
| 24 | if test -z "$result"; then |
|---|
| 25 | |
|---|
| 26 | |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi, |
|---|
| 30 | [ |
|---|
| 31 | _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo, |
|---|
| 32 | [ |
|---|
| 33 | _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint, |
|---|
| 34 | [ |
|---|
| 35 | if test "$fits_in_uint" = 1; then |
|---|
| 36 | |
|---|
| 37 | |
|---|
| 38 | AC_TRY_COMPILE([ |
|---|
| 39 | extern size_t foo; |
|---|
| 40 | extern unsigned long foo; |
|---|
| 41 | ], [], fits_in_uint=0) |
|---|
| 42 | fi |
|---|
| 43 | if test -z "$result"; then |
|---|
| 44 | if test "$fits_in_uint" = 1; then |
|---|
| 45 | result="$res_hi$res_lo"U |
|---|
| 46 | else |
|---|
| 47 | result="$res_hi$res_lo"UL |
|---|
| 48 | fi |
|---|
| 49 | else |
|---|
| 50 | |
|---|
| 51 | result='~(size_t)0' |
|---|
| 52 | fi |
|---|
| 53 | fi |
|---|
| 54 | AC_MSG_RESULT([$result]) |
|---|
| 55 | if test "$result" != yes; then |
|---|
| 56 | AC_DEFINE_UNQUOTED([SIZE_MAX], [$result], |
|---|
| 57 | [Define as the maximum value of type 'size_t', if the system doesn't define it.]) |
|---|
| 58 | fi |
|---|
| 59 | ]) |
|---|