dnl AUTOCONF configuration for syscalls
dnl Copyright (C) 2003  Sam Steingold <sds@gnu.org>
dnl GNU GPL2

AC_PREREQ(2.57)
AC_INIT(syscalls, 1.0, clisp-list)
AC_CONFIG_SRCDIR(posix.lisp)
AC_CONFIG_HEADERS(config.h)

AC_MSG_NOTICE([ * System Calls (Tools)])
AC_PROG_CC
AC_PROG_CPP

AC_MSG_NOTICE([ * System Calls (Headers)])
AC_HEADER_STDC
AC_HEADER_TIME
AC_CHECK_HEADERS(errno.h fcntl.h netdb.h sys/resource.h sys/utsname.h)
AC_CHECK_HEADERS(pwd.h sys/stat.h sys/time.h sys/unistd.h time.h unistd.h)
AC_CHECK_HEADERS(shlobj.h)
if test "$ac_cv_header_shlobj_h" = yes ; then
   LIBS=${LIBS}' -luser32 -lole32 -luuid';
fi
AC_CHECK_HEADERS(sys/statvfs.h sys/statfs.h sys/vfs.h sys/types.h)

AC_MSG_NOTICE([ * System Calls (Functions)])
AC_CHECK_FUNCS(clock fcntl gethostent getrusage getrlimit sysconf uname)
AC_CHECK_FUNCS(getlogin getpwent getpwnam getpwuid getuid)
AC_CHECK_FUNCS(fchmod fchown fstat link lstat stat symlink utimes)
AC_CHECK_FUNCS(erf erfc lgamma lgamma_r)
AC_CHECK_FUNCS(fstatvfs statvfs)
AC_CHECK_DECLS(signgam, , , [#include <math.h>] )

AC_MSG_NOTICE([ * System Calls (output)])
AC_CONFIG_FILES(Makefile link.sh)
AC_OUTPUT

AC_MSG_NOTICE([ * System Calls (done)])
