AC_CHECK_SIZEOF(size_t)
AC_CHECK_SIZEOF(long long)
AC_CHECK_SIZEOF(unsigned long long)
+AC_CHECK_SIZEOF(__int64)
+AC_CHECK_SIZEOF(unsigned __int64)
AC_CHECK_SIZEOF(void *)
AC_CHECK_SIZEOF(intptr_t)
AC_CHECK_SIZEOF(uintptr_t)
AC_SUBST([SCM_I_GSC_T_UINT32])
### Optional type scm_t_int64 (ANSI C says int, short, or long might work)
-### Also try long long if we have it.
+### Also try 'long long' and '__int64' if we have it.
SCM_I_GSC_T_INT64=0
if test "$ac_cv_sizeof_int" -eq 8; then
SCM_I_GSC_T_INT64='"int"'
SCM_I_GSC_T_INT64='"short"'
elif test "$ac_cv_sizeof_long_long" -eq 8; then
SCM_I_GSC_T_INT64='"long long"'
+elif test "$ac_cv_sizeof___int64" -eq 8; then
+ SCM_I_GSC_T_INT64='"__int64"'
elif test "$scm_stdint_has_int64"; then
SCM_I_GSC_T_INT64='"int64_t"'
SCM_I_GSC_NEEDS_STDINT_H=1
AC_SUBST([SCM_I_GSC_T_INT64])
### Optional type scm_t_uint64 (ANSI C says int, short, or long might work)
-### Also try long long if we have it.
+### Also try 'long long' and '__int64' if we have it.
SCM_I_GSC_T_UINT64=0
if test "$ac_cv_sizeof_unsigned_int" -eq 8; then
SCM_I_GSC_T_UINT64='"unsigned int"'
SCM_I_GSC_T_UINT64='"unsigned short"'
elif test "$ac_cv_sizeof_unsigned_long_long" -eq 8; then
SCM_I_GSC_T_UINT64='"unsigned long long"'
+elif test "$ac_cv_sizeof_unsigned___int64" -eq 8; then
+ SCM_I_GSC_T_UINT64='"unsigned __int64"'
elif test "$scm_stdint_has_uint64"; then
SCM_I_GSC_T_UINT64='"uint64_t"'
SCM_I_GSC_NEEDS_STDINT_H=1
AC_TYPE_SIGNAL
AC_TYPE_MODE_T
-AC_CHECK_LIB(m, main)
+if test $MINGW32 = no; then
+ AC_CHECK_LIB(m, main)
+fi
AC_CHECK_FUNCS(gethostbyname)
if test $ac_cv_func_gethostbyname = no; then
AC_CHECK_LIB(nsl, gethostbyname)
AC_CHECK_HEADERS([assert.h])
-AC_CHECK_FUNCS([ctermid ftime fchown getcwd geteuid gettimeofday lstat mkdir mknod nice readlink rename rmdir select setegid seteuid setlocale setpgid setsid sigaction siginterrupt strftime strptime symlink sync tcgetpgrp tcsetpgrp times uname waitpid strdup system usleep atexit on_exit chown link fcntl ttyname getpwent getgrent kill getppid getpgrp fork setitimer getitimer strchr strcmp index bcopy memcpy rindex])
+AC_CHECK_FUNCS([ctermid ftime fchown getcwd geteuid gettimeofday lstat mkdir mknod nice readlink rename rmdir select setegid seteuid setlocale setpgid setsid sigaction siginterrupt strftime strptime symlink sync tcgetpgrp tcsetpgrp times uname waitpid strdup system usleep atexit on_exit chown link fcntl ttyname getpwent getgrent kill getppid getpgrp fork setitimer getitimer strchr strcmp index bcopy memcpy rindex unsetenv])
AC_CHECK_HEADERS(crypt.h sys/resource.h sys/file.h)
AC_CHECK_FUNCS(chroot flock getlogin cuserid getpriority setpriority getpass sethostname gethostname)
[Define if the system supports Unix-domain (file-domain) sockets.])
fi
-AC_CHECK_FUNCS(socketpair getgroups setpwent pause tzset)
+AC_CHECK_FUNCS(socketpair getgroups setgroups setpwent pause tzset)
AC_CHECK_FUNCS(sethostent gethostent endhostent dnl
setnetent getnetent endnetent dnl
inet_pton inet_ntop)
AC_MSG_CHECKING(for __libc_stack_end)
-AC_TRY_LINK([extern char *__libc_stack_end;],
- [char *p = __libc_stack_end;],
- have_libc_stack_end=yes,
- have_libc_stack_end=no)
-AC_MSG_RESULT($have_libc_stack_end)
-
-if test $have_libc_stack_end = yes; then
+AC_CACHE_VAL(guile_cv_have_libc_stack_end,
+[AC_TRY_LINK([#include <stdio.h>
+extern char *__libc_stack_end;],
+ [printf("%p", (char*) __libc_stack_end);],
+ guile_cv_have_libc_stack_end=yes,
+ guile_cv_have_libc_stack_end=no)])
+AC_MSG_RESULT($guile_cv_have_libc_stack_end)
+
+if test $guile_cv_have_libc_stack_end = yes; then
AC_DEFINE(HAVE_LIBC_STACK_END, 1,
[Define if you have the __libc_stack_end variable.])
fi
AC_CHECK_HEADERS(floatingpoint.h ieeefp.h nan.h)
-AC_CHECK_FUNCS(finite isinf isnan copysign)
+# Reasons for testing:
+# asinh, acosh, atanh, trunc - C99 standard, generally not available on
+# older systems
+# sincos - GLIBC extension
+#
+AC_CHECK_FUNCS(asinh acosh atanh copysign finite isinf isnan sincos trunc)
# When testing for the presence of alloca, we need to add alloca.o
# explicitly to LIBOBJS to make sure that it is translated to
[],
[AC_MSG_WARN(Guessing that stack grows down -- see scmconfig.h)])
-AH_TEMPLATE([SCM_SINGLES],
- [Define this if floats are the same size as longs.])
-
-AC_CACHE_CHECK([whether floats fit in longs], guile_cv_type_float_fits_long,
- [AC_TRY_RUN([main () { exit (sizeof(float) > sizeof(long)); }],
- [guile_cv_type_float_fits_long=yes],
- [guile_cv_type_float_fits_long=no],
- [guile_cv_type_float_fits_long=guess-yes])])
-case $guile_cv_type_float_fits_long in
- "yes" )
- AC_DEFINE(SCM_SINGLES)
- ;;
- "guess-yes" )
- AC_DEFINE(SCM_SINGLES)
- AC_MSG_WARN([guessing that sizeof(long) == sizeof(float)])
- AC_MSG_WARN([see SCM_SINGLES in scmconfig.h.in])
- ;;
-esac
-
+AC_CHECK_SIZEOF(float)
+if test "$ac_cv_sizeof_float" -le "$ac_cv_sizeof_long"; then
+ AC_DEFINE(SCM_SINGLES, 1,
+ [Define this if floats are the same size as longs.])
+fi
AC_MSG_CHECKING(for struct linger)
AC_CACHE_VAL(scm_cv_struct_linger,
AC_DEFINE_UNQUOTED(SCM_MUTEX_RECURSIVE, $guile_cv_have_mutex_recursive,
[The mutex kind enum for recursive mutexes.])
fi
+
+ # On Solaris, sched_yield lives in -lrt.
+ AC_SEARCH_LIBS(sched_yield, rt)
+
;;
esac
else
CC_FOR_BUILD="${CC_FOR_BUILD-$CC}"
fi
-AC_ARG_WITH(cc-for-build,
- [ --with-cc-for-build=CC native C compiler, to be used during build])
-test -n "$with_cc_for_build" && CC_FOR_BUILD="$with_cc_for_build"
## AC_MSG_CHECKING("if we are cross compiling")
## AC_MSG_RESULT($cross_compiling)
CCLD_FOR_BUILD="$CC_FOR_BUILD"
AC_SUBST(cross_compiling)
-AC_SUBST(CC_FOR_BUILD)
+AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler])
AC_SUBST(CCLD_FOR_BUILD)
## libtool erroneously calls CC_FOR_BUILD HOST_CC;
fi
AC_SUBST(GUILE_FOR_BUILD)
-# Do this here so we don't screw up any of the tests above that might
-# not be "warning free"
-
-if test "${GUILE_ERROR_ON_WARNING}" = yes
-then
- CFLAGS="${CFLAGS} -Werror"
- enable_compile_warnings=no
-fi
-
## If we're using GCC, ask for aggressive warnings.
case "$GCC" in
yes )
## less than exasperating.
## -Wpointer-arith was here too, but something changed in gcc/glibc
## and it became equally exasperating (gcc 2.95 and/or glibc 2.1.2).
- CFLAGS="$CFLAGS -Wall -Wmissing-prototypes" ;;
+ CFLAGS="$CFLAGS -Wall -Wmissing-prototypes"
+ # Do this here so we don't screw up any of the tests above that might
+ # not be "warning free"
+ if test "${GUILE_ERROR_ON_WARNING}" = yes
+ then
+ CFLAGS="${CFLAGS} -Werror"
+ enable_compile_warnings=no
+ fi
+ ;;
esac
## NOTE the code below sets LIBOBJS directly and so is now forbidden