added support for solaris (tested) and linux (untested)
This commit is contained in:
parent
2a6d18e4b0
commit
bd1b187663
10
acconfig.h
10
acconfig.h
|
@ -35,6 +35,16 @@
|
||||||
*/
|
*/
|
||||||
#undef HAVE_DLOPEN 1
|
#undef HAVE_DLOPEN 1
|
||||||
|
|
||||||
|
/* Define if your sys_errlist is a const definition */
|
||||||
|
#undef HAVE_CONST_SYS_ERRLIST
|
||||||
|
|
||||||
|
/* Include info we know about the system from config.scsh */
|
||||||
|
#include "scsh/machine/sysdep.h"
|
||||||
|
|
||||||
|
/* Define if you have the nlist() function. This is a
|
||||||
|
not-very-portable way of looking up external symbols. */
|
||||||
|
#undef HAVE_NLIST
|
||||||
|
|
||||||
@BOTTOM@
|
@BOTTOM@
|
||||||
|
|
||||||
#include "fake/sigact.h"
|
#include "fake/sigact.h"
|
||||||
|
|
127
configure.in
127
configure.in
|
@ -11,7 +11,7 @@ dnl Note, this test didn't work correctly on Sun's which take -cckr as a
|
||||||
dnl synonym for -c. (HCC)
|
dnl synonym for -c. (HCC)
|
||||||
|
|
||||||
dnl JMG: hack hack hack
|
dnl JMG: hack hack hack
|
||||||
AR=${AR-"ar cq"}
|
dnl AR=${AR-"ar cq"}
|
||||||
|
|
||||||
|
|
||||||
define(S48_CFLAG_CKR, [dnl
|
define(S48_CFLAG_CKR, [dnl
|
||||||
|
@ -107,16 +107,111 @@ AC_DEFUN(SCSH_GMTOFF,[
|
||||||
AC_DEFINE(HAVE_GMTOFF)
|
AC_DEFINE(HAVE_GMTOFF)
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
dnl -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||||
|
AC_DEFUN(SCSH_ELF, [
|
||||||
|
AC_MSG_CHECKING(for ELF)
|
||||||
|
AC_CACHE_VAL(scsh_cv_elf,[
|
||||||
|
touch conftest.c
|
||||||
|
if ${CC} -v -o a.out conftest.c 2>&1 | grep -q __ELF__ ; then
|
||||||
|
scsh_cv_elf=yes
|
||||||
|
else
|
||||||
|
scsh_cv_elf=no
|
||||||
|
fi])
|
||||||
|
AC_MSG_RESULT($scsh_cv_elf)
|
||||||
|
if test $scsh_cv_elf = yes; then
|
||||||
|
LDFLAGS=-rdynamic
|
||||||
|
fi
|
||||||
|
rm -f conftest.c a.out
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||||
|
AC_DEFUN(SCSH_LINUX_STATIC_DEBUG, [
|
||||||
|
case "$host" in
|
||||||
|
*-*-linux* )
|
||||||
|
AC_MSG_CHECKING(for broken Linux that needs -static with -g)
|
||||||
|
AC_CACHE_VAL(scsh_cv_linux_static_debug,[
|
||||||
|
AC_TRY_LINK([],
|
||||||
|
[],
|
||||||
|
scsh_cv_linux_static_debug=no,
|
||||||
|
scsh_cv_linux_static_debug=yes)])
|
||||||
|
AC_MSG_RESULT($scsh_cv_linux_static_debug)
|
||||||
|
if test $scsh_cv_linux_static_debug = yes; then
|
||||||
|
LDFLAGS="-static ${LDFLAGS}"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||||
|
AC_DEFUN(SCSH_CONST_SYS_ERRLIST,[
|
||||||
|
AC_MSG_CHECKING(for const sys_errlist)
|
||||||
|
AC_CACHE_VAL(scsh_cv_const_sys_errlist,[
|
||||||
|
AC_TRY_COMPILE([#include <errno.h>
|
||||||
|
#include <unistd.h>],
|
||||||
|
[const extern char *sys_errlist[];],
|
||||||
|
scsh_cv_const_sys_errlist=yes,
|
||||||
|
scsh_cv_const_sys_errlist=no)])
|
||||||
|
AC_MSG_RESULT($scsh_cv_const_sys_errlist)
|
||||||
|
if test $scsh_cv_const_sys_errlist = yes; then
|
||||||
|
AC_DEFINE(HAVE_CONST_SYS_ERRLIST)
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
dnl -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
dnl -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||||
AC_INIT(c/scheme48vm.c)
|
AC_INIT(c/scheme48vm.c)
|
||||||
AC_CONFIG_HEADER(c/sysdep.h)
|
AC_CONFIG_HEADER(c/sysdep.h)
|
||||||
|
AC_CANONICAL_HOST
|
||||||
S48_PROG_CC
|
S48_PROG_CC
|
||||||
AC_ISC_POSIX
|
AC_ISC_POSIX
|
||||||
|
SCSH_LINUX_STATIC_DEBUG
|
||||||
dnl set the cross-compile flag before we try anything.
|
dnl set the cross-compile flag before we try anything.
|
||||||
AC_TRY_RUN([int main() { return 0;}], [], [], [true])
|
AC_TRY_RUN([int main() { return 0;}], [], [], [true])
|
||||||
S48_CFLAG_CKR
|
S48_CFLAG_CKR
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
|
AC_PROG_RANLIB
|
||||||
|
AC_C_CONST
|
||||||
|
|
||||||
|
AC_C_BIGENDIAN
|
||||||
|
if test $ac_cv_c_bigendian = no ; then
|
||||||
|
ENDIAN=little
|
||||||
|
else
|
||||||
|
ENDIAN=big
|
||||||
|
fi
|
||||||
|
|
||||||
|
AR=${AR-"ar cq"}
|
||||||
|
TMPDIR=${TMPDIR-"/usr/tmp"}
|
||||||
|
case "$host" in
|
||||||
|
## Linux
|
||||||
|
*-*-linux* )
|
||||||
|
dir=linux
|
||||||
|
# gross, but needed for some older a.out systems for 0.4.x
|
||||||
|
LIBS=-lc
|
||||||
|
SCSH_ELF
|
||||||
|
;;
|
||||||
|
|
||||||
|
## NetBSD and FreeBSD ( and maybe 386BSD also)
|
||||||
|
*-*-*bsd* )
|
||||||
|
dir=bsd
|
||||||
|
SCSH_ELF
|
||||||
|
;;
|
||||||
|
## Solaris - Sparc and i386
|
||||||
|
*-*-solaris* )
|
||||||
|
dir=solaris
|
||||||
|
AC_DEFINE(HAVE_NLIST)
|
||||||
|
;;
|
||||||
|
|
||||||
|
* )
|
||||||
|
dir=generic
|
||||||
|
echo "WARNING: "
|
||||||
|
echo "WARNING: Using generic configuration."
|
||||||
|
echo "WARNING: See doc/install.txt for more information."
|
||||||
|
echo "WARNING: "
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
rm -f $srcdir/scsh/machine
|
||||||
|
ln -s $srcdir/$dir $srcdir/scsh/machine
|
||||||
|
|
||||||
|
|
||||||
AC_CHECK_LIB(m, main)
|
AC_CHECK_LIB(m, main)
|
||||||
AC_CHECK_LIB(dl, main)
|
AC_CHECK_LIB(dl, main)
|
||||||
AC_CHECK_LIB(mld, main)
|
AC_CHECK_LIB(mld, main)
|
||||||
|
@ -129,8 +224,8 @@ AC_INIT(c/scheme48vm.c)
|
||||||
S48_POSIX_LIBC
|
S48_POSIX_LIBC
|
||||||
AC_CONST
|
AC_CONST
|
||||||
AC_RETSIGTYPE
|
AC_RETSIGTYPE
|
||||||
AC_CHECK_HEADERS(libgen.h sys/timeb.h posix/time.h)
|
AC_CHECK_HEADERS(libgen.h sys/timeb.h posix/time.h sys/select.h nlist.h)
|
||||||
AC_CHECK_HEADERS(sys/select.h)
|
AC_CHECK_HEADERS(sys/un.h)
|
||||||
AC_CHECK_FUNCS(gettimeofday ftime nlist select setitimer sigaction)
|
AC_CHECK_FUNCS(gettimeofday ftime nlist select setitimer sigaction)
|
||||||
AC_CHECK_FUNC(dlopen, AC_DEFINE(HAVE_DLOPEN),
|
AC_CHECK_FUNC(dlopen, AC_DEFINE(HAVE_DLOPEN),
|
||||||
AC_CHECK_FUNC(nlist, [LIBOBJS="$LIBOBJS c/fake/libdl1.c],
|
AC_CHECK_FUNC(nlist, [LIBOBJS="$LIBOBJS c/fake/libdl1.c],
|
||||||
|
@ -159,9 +254,29 @@ fail
|
||||||
AC_MSG_RESULT([no]))
|
AC_MSG_RESULT([no]))
|
||||||
S48_USCORE
|
S48_USCORE
|
||||||
S48_RDYNAMIC
|
S48_RDYNAMIC
|
||||||
|
SCSH_TZNAME
|
||||||
|
SCSH_GMTOFF
|
||||||
|
SCSH_CONST_SYS_ERRLIST
|
||||||
|
CFLAGS1=${CFLAGS}
|
||||||
|
|
||||||
AC_SUBST(CFLAGS)
|
AC_SUBST(CFLAGS)
|
||||||
AC_SUBST(LIBOBJS)
|
AC_SUBST(LIBOBJS)
|
||||||
AC_SUBST(LDFLAGS)
|
AC_SUBST(LDFLAGS)
|
||||||
SCSH_TZNAME
|
|
||||||
SCSH_GMTOFF
|
|
||||||
AC_OUTPUT(Makefile)
|
AC_SUBST(AIX_P)
|
||||||
|
AC_SUBST(AR)
|
||||||
|
AC_SUBST(CC)
|
||||||
|
AC_SUBST(CFLAGS)
|
||||||
|
AC_SUBST(CFLAGS1)
|
||||||
|
AC_SUBST(EXEEXT)
|
||||||
|
AC_SUBST(ENDIAN)
|
||||||
|
AC_SUBST(LDFLAGS)
|
||||||
|
AC_SUBST(LDFLAGS_AIX)
|
||||||
|
AC_SUBST(LIBS)
|
||||||
|
AC_SUBST(TMPDIR)
|
||||||
|
|
||||||
|
|
||||||
|
AC_OUTPUT(Makefile scsh/regexp/Makefile scsh/endian.scm scsh/static.scm)
|
||||||
|
chmod +x scsh/static.scm
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue