diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 46 |
1 files changed, 30 insertions, 16 deletions
diff --git a/configure.in b/configure.in index 425552588..66b98337d 100644 --- a/configure.in +++ b/configure.in @@ -77,29 +77,39 @@ fi AC_MSG_RESULT($archset) AC_DEFINE_UNQUOTED(ARCHITECTURE,"$archset") +dnl We use C9x types if at all possible +AC_CACHE_CHECK([for C9x integer types],c9x_ints,[ + AC_TRY_COMPILE([#include <inttypes.h>], + [uint8_t Foo1;uint16_t Foo2;uint32_t Foo3;uint64_t Foo], + c9x_ints=yes,c9x_ints=no)]) + dnl Check the sizes etc. of the architecture changequote(,) if archline="`sed -ne 's/^'$archset':[ ]\+\(.*\)/\1/gp' $srcdir/buildlib/sizetable`"; then -changequote([,]) - set $archline - if test "$1" = "little"; then - ac_cv_c_bigendian=no - else - ac_cv_c_bigendian=yes - fi - size_char=$2 - size_int=$3 - size_short=$4 - size_long=$5 + changequote([,]) + set $archline + if test "$1" = "little"; then + ac_cv_c_bigendian=no + else + ac_cv_c_bigendian=yes + fi + size_char=$2 + size_int=$3 + size_short=$4 + size_long=$5 fi + if test "$cross_compiling" = "yes" -a "$archline" = ""; then AC_MSG_ERROR(When cross compiling, architecture must be present in sizetable) fi AC_C_BIGENDIAN -AC_CHECK_SIZEOF(char,$size_char) -AC_CHECK_SIZEOF(int,$size_int) -AC_CHECK_SIZEOF(short,$size_short) -AC_CHECK_SIZEOF(long,$size_long) + +if test x"$c9x_ints" = x"no"; then + AC_CHECK_SIZEOF(char,$size_char) + AC_CHECK_SIZEOF(int,$size_int) + AC_CHECK_SIZEOF(short,$size_short) + AC_CHECK_SIZEOF(long,$size_long) +fi dnl Check for debiandoc AC_CHECK_PROG(DEBIANDOC_HTML,debiandoc2html,"yes","") @@ -108,4 +118,8 @@ AC_CHECK_PROG(DEBIANDOC_TEXT,debiandoc2text,"yes","") dnl Check for YODL AC_CHECK_PROG(YODL_MAN,yodl2man,"yes","") -AC_OUTPUT(environment.mak:buildlib/environment.mak.in makefile:buildlib/makefile.in,make dirs) +if test x"$c9x_ints" = x"no"; then + AC_OUTPUT(environment.mak:buildlib/environment.mak.in makefile:buildlib/makefile.in include/inttypes.h:buildlib/inttypes.h.in,make dirs) +else + AC_OUTPUT(environment.mak:buildlib/environment.mak.in makefile:buildlib/makefile.in,make dirs) +fi |