AC_INIT(src/swap_bytes.h.in) AC_CONFIG_HEADER(src/swap_bytes.h) : ${R_HOME=`R RHOME`} if test -z "${R_HOME}"; then echo "could not determine R_HOME" exit 1 fi CC=`grep "^CC" ${R_HOME}/etc/Makeconf | sed "s/^CC *= *//"` AC_PROG_CC ### check if system has a byteswap.h file defining bswap_n for n = 16, 32 and 64 AC_CHECK_HEADER(byteswap.h, AC_TRY_LINK([#include ], [ unsigned short s = 1; unsigned int i = 1; s = bswap_16(s); i = bswap_32(i); ], [AC_DEFINE(HAVE_GLIBC_BSWAP)])) AC_CHECK_SIZEOF(double, 8) AC_CHECK_SIZEOF(int, 4) AC_CHECK_SIZEOF(long, 4) AC_SUBST(SIZEOF_DOUBLE) AC_SUBST(SIZEOF_LONG) AC_SUBST(HAVE_GLIBC_BSWAP) AC_OUTPUT(src/var.h)