From: Mark Eichin Date: Fri, 28 Apr 1995 05:53:43 +0000 (+0000) Subject: * configure.in: use AC_CHECK_SIZEOF(int) to set BITS16/BITS32. X-Git-Tag: krb5-1.0-beta5~156 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=86090c2919d58c71b1b3115c3851c8f0837319e4;p=krb5.git * configure.in: use AC_CHECK_SIZEOF(int) to set BITS16/BITS32. Use AC_TRY_RUN test to set MSBFIRST or LSBFIRST. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5596 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog index ecf35d82d..2f730c3e4 100644 --- a/src/lib/krb4/ChangeLog +++ b/src/lib/krb4/ChangeLog @@ -1,3 +1,8 @@ +Fri Apr 28 01:38:42 1995 Mark W. Eichin + + * configure.in: use AC_CHECK_SIZEOF(int) to set BITS16/BITS32. + Use AC_TRY_RUN test to set MSBFIRST or LSBFIRST. + Tue Mar 28 09:19:23 1995 Mark Eichin * send_to_kdc.c (send_to_kdc): only use secondary port if entry diff --git a/src/lib/krb4/configure.in b/src/lib/krb4/configure.in index 8f10ace40..de01bfd0b 100644 --- a/src/lib/krb4/configure.in +++ b/src/lib/krb4/configure.in @@ -11,6 +11,32 @@ AC_PROG_INSTALL AC_CONST CHECK_FCNTL AC_HEADER_CHECK(unistd.h,AC_DEFINE(HAS_UNISTD_H)) +dnl need MSBFIRST, LSBFIRST, BITS16, BITS32 +AC_MSG_CHECKING([if system is msbfirst]) +AC_CACHE_VAL(krb5_cv_is_msbfirst, +[AC_TRY_RUN( +[#include +int main() +{ + int one = 1; + exit (*(char*) &one); /* MSBFIRST iff 1 */ +}], +krb5_cv_is_msbfirst=yes, krb5_cv_is_msbfirst=no +)])dnl fail on cross for now +AC_MSG_RESULT($krb5_cv_is_msbfirst) +if test $krb5_cv_is_msbfirst = yes; then + AC_DEFINE(MSBFIRST) +else + AC_DEFINE(LSBFIRST) +fi +dnl +dnl check int, set bits16/bits32 based on it +AC_CHECK_SIZEOF(int) +if test $ac_cv_sizeof_int = 2; then + AC_DEFINE(BITS16) +else + AC_DEFINE(BITS32) +fi ET_RULES SubdirLibraryRule([$(OBJS)]) KRB_INCLUDE