""
This commit is contained in:
20
configure.in
20
configure.in
@@ -80,8 +80,7 @@ dnl
|
||||
|
||||
for type in u_int8_t u_int16_t u_int32_t ; do
|
||||
AC_MSG_CHECKING([size of $type])
|
||||
defn="SIZEOF_"`echo $type | tr a-z A-Z`
|
||||
AC_TRY_RUN([
|
||||
AC_RUN_IFELSE([
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
int main() {
|
||||
@@ -91,14 +90,17 @@ int main() {
|
||||
fprintf(f, "%d\n", sizeof($1));
|
||||
exit(0);
|
||||
}
|
||||
], [
|
||||
], [
|
||||
x=`cat conftestval`
|
||||
eval "size_$type=$x"
|
||||
AC_MSG_RESULT([$x])
|
||||
], [
|
||||
], [
|
||||
eval "size_$type=0"
|
||||
AC_MSG_RESULT([unknown type])
|
||||
])
|
||||
], [
|
||||
eval "size_$type=0"
|
||||
AC_MSG_RESULT([can't determine when cross-compiling])
|
||||
])
|
||||
done
|
||||
|
||||
dnl Groan. Have to do things this way so that autoheader can do its thing....
|
||||
@@ -107,11 +109,13 @@ AC_DEFINE_UNQUOTED(SIZEOF_U_INT16_T, [$size_u_int16_t], [size of u_int16_t])
|
||||
AC_DEFINE_UNQUOTED(SIZEOF_U_INT32_T, [$size_u_int32_t], [size of u_int32_t])
|
||||
|
||||
dnl If we already have these types, don't piss about any more....
|
||||
if test $size_u_int8_t != 1 -o $size_u_int16_t != 2 -o $size_u_int32_t != 4 ; then
|
||||
|
||||
if test $size_u_int8_t != 1 || test $size_u_int16_t != 2 || test $size_u_int32_t != 4 ; then
|
||||
dnl XXXif test $size_u_int8_t != 1 -o $size_u_int16_t != 2 -o $size_u_int32_t != 4 ; then
|
||||
do_int_types=1
|
||||
AC_CHECK_HEADERS(
|
||||
[stdint.h dnl C99
|
||||
sys/inttypes.h], dnl Solaris
|
||||
stdint.h dnl C99
|
||||
sys/inttypes.h, dnl Solaris
|
||||
[do_int_types=0; break])
|
||||
|
||||
if test $do_int_types = 1 ; then
|
||||
|
||||
Reference in New Issue
Block a user