From f2e92c652a55094a014ed50bbbf91a77ae3283ec Mon Sep 17 00:00:00 2001 From: bdc Date: Fri, 16 Apr 2004 18:29:51 +0000 Subject: [PATCH] Add interix support --- Makefile.in | 4 ++-- c/unix/event.c | 2 +- c/unix/fd-io.c | 2 +- configure.in | 33 +++++++++++++++++---------------- 4 files changed, 21 insertions(+), 20 deletions(-) diff --git a/Makefile.in b/Makefile.in index 4f080ee..7f7125e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -49,7 +49,7 @@ htmldir = $(libdir)/scsh/doc/scsh-manual/html # BUILD_RUNNABLE has to be Scheme 48 0.53. This is used for builds directly # out of the CVS repository. # We cannot use Scsh here since -i is not understood. -BUILD_RUNNABLE = /afs/wsi/i386_fbsd32/bin/scheme48 +BUILD_RUNNABLE = scheme48 RUNNABLE = scsh MANPAGE = $(RUNNABLE).$(manext) LIB = $(libdir)/$(RUNNABLE) @@ -943,4 +943,4 @@ scsh/configure.scm: scsh/configure.scm.in -e 's|@scsh_DEFS@|$(DEFS)|g' \ -e 's|@scsh_CFLAGS@|$(CFLAGS)|g' \ -e 's|@scsh_CPPFLAGS@|$(CPPFLAGS)|g' \ - -e 's|@scsh_LDFLAGS@|$(LDFLAGS)|g' $< > $@ + -e 's|@scsh_LDFLAGS@|$(LDFLAGS)|g' scsh/configure.scm.in > $@ diff --git a/c/unix/event.c b/c/unix/event.c index 9d98ccf..d7acabf 100644 --- a/c/unix/event.c +++ b/c/unix/event.c @@ -1,6 +1,7 @@ /* Copyright (c) 1993-1999 by Richard Kelsey and Jonathan Rees. See file COPYING. */ +#include "sysdep.h" #include /* for sigaction() (POSIX.1) */ #include #include @@ -9,7 +10,6 @@ #include #include #include /* for errno, (POSIX?/ANSI) */ -#include "sysdep.h" #include "c-mods.h" #include "scheme48vm.h" #include "event.h" diff --git a/c/unix/fd-io.c b/c/unix/fd-io.c index 22c8083..fbeda9b 100644 --- a/c/unix/fd-io.c +++ b/c/unix/fd-io.c @@ -1,6 +1,7 @@ /* Copyright (c) 1993-1999 by Richard Kelsey and Jonathan Rees. See file COPYING. */ +#include "sysdep.h" #include #include #include @@ -8,7 +9,6 @@ #include #include #include /* for errno, (POSIX?/ANSI) */ -#include "sysdep.h" #include "c-mods.h" #include "scheme48vm.h" #include "event.h" diff --git a/configure.in b/configure.in index cb2ae02..05e47ad 100644 --- a/configure.in +++ b/configure.in @@ -268,18 +268,22 @@ AC_INIT(c/scheme48vm.c) AIX_P="exportlist.aix" ;; - ## Linux - *-*-linux* ) - dir=linux - # gross, but needed for some older a.out systems for 0.4.x - LIBS=-lc - SCSH_ELF + ## NetBSD, FreeBSD, OpenBSD, Darwin/MacOS X ( and maybe 386BSD also) + *-*-*bsd*|*-*-darwin* ) + dir=bsd + SCSH_ELF ;; - ## NetBSD and FreeBSD ( and maybe 386BSD also) - *-*-*bsd*|*-*-darwin* ) - dir=bsd - SCSH_ELF + ## interix (aka Microsoft Windows Services for Unix) + *-*-interix* ) + dir=bsd + AC_DEFINE(_ALL_SOURCE, 1, [Define to 1 on interix to get MAXHOSTNAMELEN]) + ;; + + ## NetBSD, FreeBSD, OpenBSD, Darwin/MacOS X ( and maybe 386BSD also) + *-*-*bsd*|*-*-darwin* ) + dir=bsd + SCSH_ELF ;; ## NeXT @@ -304,7 +308,6 @@ AC_INIT(c/scheme48vm.c) ## Solaris - Sparc and i386 *-*-solaris* ) dir=solaris - AC_DEFINE(HAVE_NLIST) ;; ## NT - cygwin32 @@ -344,10 +347,8 @@ esac S48_POSIX_LIBC AC_CONST AC_RETSIGTYPE - AC_CHECK_HEADERS(libgen.h sys/timeb.h posix/time.h sys/select.h nlist.h) - AC_CHECK_HEADERS(sys/un.h) - AC_CHECK_HEADERS(crypt.h) - AC_CHECK_FUNCS(gettimeofday ftime nlist select setitimer sigaction vasprintf) + AC_CHECK_HEADERS(sys/select.h crypt.h) + AC_CHECK_FUNCS(select sigaction vasprintf sync) SCSH_SOCKLEN_T AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_DLOPEN, 1, [Define to 1 if the interface to the dynamic linker exists]) @@ -355,7 +356,7 @@ esac [AC_CHECK_FUNC(nlist, [AC_LIBOBJ([c/fake/libdl1])], [AC_LIBOBJ([c/fake/libdl2])]) have_dlopen="no"]) - AC_CHECK_FUNCS(socket chroot) + AC_CHECK_FUNCS() AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR, 1, [Define to 1 if you have the strerror function]), [AC_LIBOBJ([c/fake/strerror])])