mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-11 03:33:11 -08:00
- Moved setting *features* for ecl_min to compile.lsp
- Added possibility of compiling --without-cmp (for cross-compilation)
This commit is contained in:
parent
cc474f497a
commit
32e51960bb
5 changed files with 57 additions and 34 deletions
14
src/aclocal.m4
vendored
14
src/aclocal.m4
vendored
|
|
@ -1,4 +1,11 @@
|
|||
dnl -*- autoconf -*-
|
||||
dnl --------------------------------------------------------------
|
||||
dnl Add *feature* for conditional compilation.
|
||||
AC_DEFUN([ECL_ADD_FEATURE], [
|
||||
LSP_FEATURES="(cons :$1 ${LSP_FEATURES})"
|
||||
])
|
||||
|
||||
|
||||
dnl --------------------------------------------------------------
|
||||
dnl Add Lisp library to compile in. Second argument is a hack
|
||||
dnl to add sysfun.lsp.
|
||||
|
|
@ -6,6 +13,7 @@ dnl
|
|||
AC_DEFUN([ECL_ADD_LISP_LIBRARY], [
|
||||
if test ${enable_shared} = "yes" ; then
|
||||
LSP_LIBRARIES="${LSP_LIBRARIES} $1.fas $2"
|
||||
ECL_ADD_FEATURE([wants-$1])
|
||||
else
|
||||
LSP_LIBRARIES="${LSP_LIBRARIES} ${LIBPREFIX}$1.${LIBEXT} $2"
|
||||
fi ])
|
||||
|
|
@ -18,8 +26,10 @@ dnl
|
|||
AC_DEFUN([ECL_ADD_LISP_MODULE], [
|
||||
if test ${enable_shared} = "yes" ; then
|
||||
ECL_MODULES="${ECL_MODULES} $1"
|
||||
ECL_ADD_FEATURE([wants-$1])
|
||||
elif test $2; then
|
||||
LSP_LIBRARIES="${LSP_LIBRARIES} ${LIBPREFIX}$1.${LIBEXT}"
|
||||
ECL_ADD_FEATURE([wants-$1])
|
||||
else
|
||||
AC_MSG_ERROR([Can't compile in $1 without shared library support!])
|
||||
fi ])
|
||||
|
|
@ -29,7 +39,6 @@ dnl Set up a configuration file for the case when we are cross-
|
|||
dnl compiling
|
||||
dnl
|
||||
AC_DEFUN(ECL_CROSS_CONFIG,[
|
||||
PUSH_CROSS_FEATURES=''
|
||||
if test "x${cross_compiling}" = "xyes"; then
|
||||
if test -n "${with_cross_config}" -a -f "${with_cross_config}"; then
|
||||
. ${with_cross_config}
|
||||
|
|
@ -103,9 +112,8 @@ EOF
|
|||
(echo '#!/bin/sh'; echo exec ${ECL_MIN_TO_RUN} '$''*') > CROSS-COMPILER
|
||||
(echo '#!/bin/sh'; echo exec ${DPP_TO_RUN} '$''*') > CROSS-DPP
|
||||
chmod +x CROSS-COMPILER CROSS-DPP
|
||||
PUSH_CROSS_FEATURES='(setq *features* (cons :cross *features*))'
|
||||
ECL_ADD_FEATURE([cross])
|
||||
fi
|
||||
AC_SUBST(PUSH_CROSS_FEATURES)
|
||||
])
|
||||
|
||||
dnl --------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -62,18 +62,6 @@ main(int argc, char **args)
|
|||
#endif
|
||||
SYM_VAL(@'*package*') = cl_core.system_package;
|
||||
SYM_VAL(@'*features*') = CONS(make_keyword("ECL-MIN"), SYM_VAL(@'*features*'));
|
||||
#ifdef CLOS
|
||||
SYM_VAL(@'*features*') = CONS(make_keyword("WANTS-CLOS"), SYM_VAL(@'*features*'));
|
||||
#endif
|
||||
#ifndef RUNTIME
|
||||
SYM_VAL(@'*features*') = CONS(make_keyword("WANTS-CMP"), SYM_VAL(@'*features*'));
|
||||
#endif
|
||||
#ifdef CLX
|
||||
SYM_VAL(@'*features*') = CONS(make_keyword("WANTS-CLX"), SYM_VAL(@'*features*'));
|
||||
#endif
|
||||
#ifdef TCP
|
||||
SYM_VAL(@'*features*') = CONS(make_keyword("WANTS-SOCKETS"), SYM_VAL(@'*features*'));
|
||||
#endif
|
||||
top_level = _intern("TOP-LEVEL", cl_core.system_package);
|
||||
cl_def_c_function(top_level, si_simple_toplevel, 0);
|
||||
funcall(1, top_level);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
;;;
|
||||
|
||||
(setq *package* (find-package "SYSTEM"))
|
||||
@PUSH_CROSS_FEATURES@
|
||||
(setq *features* @LSP_FEATURES@)
|
||||
|
||||
;;;
|
||||
;;; * Ensure that we have the whole of Common-Lisp to compile
|
||||
|
|
|
|||
51
src/configure
vendored
51
src/configure
vendored
|
|
@ -310,7 +310,7 @@ ac_includes_default="\
|
|||
# include <unistd.h>
|
||||
#endif"
|
||||
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS docdir ECL_CFLAGS FASL_LIBS CORE_LIBS SHARED_LDFLAGS BUNDLE_LDFLAGS SHORT_SITE_NAME LONG_SITE_NAME EXTRA_OBJS TARGETS SUBDIRS LIBRARIES LSP_LIBRARIES ECL_MODULES build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE true_srcdir true_builddir PUSH_CROSS_FEATURES CP RM MV EXE_SUFFIX ARCHITECTURE SOFTWARE_TYPE SOFTWARE_VERSION MACHINE_INSTANCE MACHINE_VERSION LDRPATH LIBPREFIX LIBEXT SHAREDEXT SHAREDPREFIX INSTALL_TARGET thehost INFOEXT INSTALL_INFO EGREP ECL_SETJMP ECL_LONGJMP ECL_FILE_CNT CL_FIXNUM_TYPE CL_FIXNUM_BITS CL_FIXNUM_MAX CL_FIXNUM_MIN LIBOBJS POW_LIB ECL_CC CLX_INFO LTLIBOBJS'
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS docdir ECL_CFLAGS FASL_LIBS CORE_LIBS SHARED_LDFLAGS BUNDLE_LDFLAGS SHORT_SITE_NAME LONG_SITE_NAME EXTRA_OBJS TARGETS SUBDIRS LIBRARIES LSP_LIBRARIES LSP_FEATURES ECL_MODULES build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE true_srcdir true_builddir CP RM MV EXE_SUFFIX ARCHITECTURE SOFTWARE_TYPE SOFTWARE_VERSION MACHINE_INSTANCE MACHINE_VERSION LDRPATH LIBPREFIX LIBEXT SHAREDEXT SHAREDPREFIX INSTALL_TARGET thehost INFOEXT INSTALL_INFO EGREP ECL_SETJMP ECL_LONGJMP ECL_FILE_CNT CL_FIXNUM_TYPE CL_FIXNUM_BITS CL_FIXNUM_MAX CL_FIXNUM_MIN LIBOBJS POW_LIB ECL_CC CLX_INFO LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
|
||||
# Initialize some variables set by options.
|
||||
|
|
@ -887,6 +887,7 @@ Optional Packages:
|
|||
--with-cmuformat use CMUCL's FORMAT routine (default=YES)
|
||||
--with-asdf include ASDF building facility (default=YES if
|
||||
shared library support is on)
|
||||
--with-cmp build in the compiler (default=YES)
|
||||
--with-x use the X Window System
|
||||
|
||||
Some influential environment variables:
|
||||
|
|
@ -1535,6 +1536,15 @@ else
|
|||
with_asdf=${enable_shared}
|
||||
fi;
|
||||
|
||||
|
||||
# Check whether --with-cmp or --without-cmp was given.
|
||||
if test "${with_cmp+set}" = set; then
|
||||
withval="$with_cmp"
|
||||
|
||||
else
|
||||
with_cmp=yes
|
||||
fi;
|
||||
|
||||
libdir="${libdir}/ecl"
|
||||
includedir="${libdir}/ecl/h"
|
||||
test -z "${docdir}" && docdir="${datadir}/doc/ecl"
|
||||
|
|
@ -1544,6 +1554,7 @@ boehm_configure_flags=""
|
|||
|
||||
TARGETS='ecl$(EXE)'
|
||||
SUBDIRS=c
|
||||
LSP_FEATURES='*features*'
|
||||
|
||||
|
||||
# Make sure we can run config.sub.
|
||||
|
|
@ -3367,7 +3378,6 @@ else
|
|||
fi
|
||||
|
||||
|
||||
PUSH_CROSS_FEATURES=''
|
||||
if test "x${cross_compiling}" = "xyes"; then
|
||||
if test -n "${with_cross_config}" -a -f "${with_cross_config}"; then
|
||||
. ${with_cross_config}
|
||||
|
|
@ -3448,9 +3458,10 @@ echo "$as_me: error: The program DPP is not installed in your system" >&2;}
|
|||
(echo '#!/bin/sh'; echo exec ${ECL_MIN_TO_RUN} '$''*') > CROSS-COMPILER
|
||||
(echo '#!/bin/sh'; echo exec ${DPP_TO_RUN} '$''*') > CROSS-DPP
|
||||
chmod +x CROSS-COMPILER CROSS-DPP
|
||||
PUSH_CROSS_FEATURES='(setq *features* (cons :cross *features*))'
|
||||
fi
|
||||
|
||||
LSP_FEATURES="(cons :cross ${LSP_FEATURES})"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
#### Some command variations:
|
||||
|
|
@ -9601,12 +9612,17 @@ _ACEOF
|
|||
|
||||
fi
|
||||
|
||||
if test "${with_cmp}" = "yes"; then
|
||||
|
||||
if test ${enable_shared} = "yes" ; then
|
||||
LSP_LIBRARIES="${LSP_LIBRARIES} cmp.fas sysfun.lsp"
|
||||
|
||||
LSP_FEATURES="(cons :wants-cmp ${LSP_FEATURES})"
|
||||
|
||||
else
|
||||
LSP_LIBRARIES="${LSP_LIBRARIES} ${LIBPREFIX}cmp.${LIBEXT} sysfun.lsp"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if test ${with_clx} = "yes"; then
|
||||
|
|
@ -9614,31 +9630,30 @@ if test ${with_clx} = "yes"; then
|
|||
|
||||
if test ${enable_shared} = "yes" ; then
|
||||
LSP_LIBRARIES="${LSP_LIBRARIES} clx.fas "
|
||||
|
||||
LSP_FEATURES="(cons :wants-clx ${LSP_FEATURES})"
|
||||
|
||||
else
|
||||
LSP_LIBRARIES="${LSP_LIBRARIES} ${LIBPREFIX}clx.${LIBEXT} "
|
||||
fi
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define CLX 1
|
||||
_ACEOF
|
||||
|
||||
CLX_INFO="clx.${INFOEXT}"
|
||||
else
|
||||
CLX_INFO=""
|
||||
fi
|
||||
|
||||
if test "${with_tcp}" = "yes"; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define TCP 1
|
||||
_ACEOF
|
||||
|
||||
EXTRA_OBJS="${EXTRA_OBJS} tcp.${OBJEXT}"
|
||||
|
||||
if test ${enable_shared} = "yes" ; then
|
||||
ECL_MODULES="${ECL_MODULES} sockets"
|
||||
|
||||
LSP_FEATURES="(cons :wants-sockets ${LSP_FEATURES})"
|
||||
|
||||
elif test yes; then
|
||||
LSP_LIBRARIES="${LSP_LIBRARIES} ${LIBPREFIX}sockets.${LIBEXT}"
|
||||
|
||||
LSP_FEATURES="(cons :wants-sockets ${LSP_FEATURES})"
|
||||
|
||||
else
|
||||
{ { echo "$as_me:$LINENO: error: Can't compile in sockets without shared library support!" >&5
|
||||
echo "$as_me: error: Can't compile in sockets without shared library support!" >&2;}
|
||||
|
|
@ -9651,8 +9666,14 @@ if test "${with_asdf}" = "yes"; then
|
|||
|
||||
if test ${enable_shared} = "yes" ; then
|
||||
ECL_MODULES="${ECL_MODULES} asdf"
|
||||
|
||||
LSP_FEATURES="(cons :wants-asdf ${LSP_FEATURES})"
|
||||
|
||||
elif test ; then
|
||||
LSP_LIBRARIES="${LSP_LIBRARIES} ${LIBPREFIX}asdf.${LIBEXT}"
|
||||
|
||||
LSP_FEATURES="(cons :wants-asdf ${LSP_FEATURES})"
|
||||
|
||||
else
|
||||
{ { echo "$as_me:$LINENO: error: Can't compile in asdf without shared library support!" >&5
|
||||
echo "$as_me: error: Can't compile in asdf without shared library support!" >&2;}
|
||||
|
|
@ -10330,6 +10351,7 @@ s,@TARGETS@,$TARGETS,;t t
|
|||
s,@SUBDIRS@,$SUBDIRS,;t t
|
||||
s,@LIBRARIES@,$LIBRARIES,;t t
|
||||
s,@LSP_LIBRARIES@,$LSP_LIBRARIES,;t t
|
||||
s,@LSP_FEATURES@,$LSP_FEATURES,;t t
|
||||
s,@ECL_MODULES@,$ECL_MODULES,;t t
|
||||
s,@build@,$build,;t t
|
||||
s,@build_cpu@,$build_cpu,;t t
|
||||
|
|
@ -10359,7 +10381,6 @@ s,@LN_S@,$LN_S,;t t
|
|||
s,@SET_MAKE@,$SET_MAKE,;t t
|
||||
s,@true_srcdir@,$true_srcdir,;t t
|
||||
s,@true_builddir@,$true_builddir,;t t
|
||||
s,@PUSH_CROSS_FEATURES@,$PUSH_CROSS_FEATURES,;t t
|
||||
s,@CP@,$CP,;t t
|
||||
s,@RM@,$RM,;t t
|
||||
s,@MV@,$MV,;t t
|
||||
|
|
|
|||
|
|
@ -121,6 +121,11 @@ AC_ARG_WITH(asdf,
|
|||
[(default=YES if shared library support is on)]),
|
||||
[], [with_asdf=${enable_shared}])
|
||||
|
||||
AC_ARG_WITH(cmp,
|
||||
AS_HELP_STRING( [--with-cmp],
|
||||
[build in the compiler (default=YES)] ),
|
||||
[], [with_cmp=yes])
|
||||
|
||||
dnl -----------------------------------------------------------------------
|
||||
dnl Installation directories
|
||||
libdir="${libdir}/ecl"
|
||||
|
|
@ -147,6 +152,7 @@ AC_SUBST(TARGETS, ['ecl$(EXE)'])dnl Versions of ECL to be built
|
|||
AC_SUBST(SUBDIRS, [c]) dnl Subdirectories that make should process
|
||||
AC_SUBST(LIBRARIES, []) dnl GMP, Boehm's GC, etc
|
||||
AC_SUBST(LSP_LIBRARIES) dnl Libraries produced by lisp translator
|
||||
AC_SUBST(LSP_FEATURES, ['*features*']) dnl Symbols to add to *FEATURES* for conditional compilation
|
||||
AC_SUBST(ECL_MODULES, []) dnl Contributed modules to be built in
|
||||
|
||||
|
||||
|
|
@ -399,20 +405,20 @@ if test "${with_clos_streams}" = "yes"; then
|
|||
[Allow STREAM operations to work on arbitrary objects])
|
||||
fi
|
||||
|
||||
ECL_ADD_LISP_LIBRARY([cmp], [sysfun.lsp])
|
||||
if test "${with_cmp}" = "yes"; then
|
||||
ECL_ADD_LISP_LIBRARY([cmp], [sysfun.lsp])
|
||||
fi
|
||||
|
||||
AC_SUBST(CLX_INFO)
|
||||
if test ${with_clx} = "yes"; then
|
||||
tcp="yes"
|
||||
ECL_ADD_LISP_LIBRARY([clx])
|
||||
AC_DEFINE(CLX, [1], [CLX support])
|
||||
CLX_INFO="clx.${INFOEXT}"
|
||||
else
|
||||
CLX_INFO=""
|
||||
fi
|
||||
|
||||
if test "${with_tcp}" = "yes"; then
|
||||
AC_DEFINE(TCP, [1], [Network streams])
|
||||
EXTRA_OBJS="${EXTRA_OBJS} tcp.${OBJEXT}"
|
||||
ECL_ADD_LISP_MODULE([sockets], [yes])
|
||||
LIBS="${LIBS} ${TCPLIBS}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue