The build system has been cleaned. The --with-system-* options now can automatically detect the existence of GMP and Boehm-Weiser libraries

This commit is contained in:
jjgarcia 2005-04-12 11:59:26 +00:00
parent 80fd4e2dc4
commit 28e3a1c47f
24 changed files with 5988 additions and 1472 deletions

View file

@ -28,11 +28,11 @@
# everything deleted by distclean.
SHELL = /bin/sh
MACHINE = @MACHINE@
MACHINE = @MACHINE_VERSION@
# ========================= Last release ================================
VERSION=@ECL_VERSION@
VERSION=@PACKAGE_VERSION@
WWW=http://ecls.sourceforge.net/
# ==================== Things `configure' Might Edit ====================
@ -58,6 +58,7 @@ TAR_CONTENTS=Makefile.in README.1st LGPL ANNOUNCEMENT Copyright doc \
# ==================== Utility Programs for the Build ====================
# Allow the user to specify the install program.
@SET_MAKE@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@

1
configure vendored
View file

@ -3,6 +3,7 @@
# This is just a driver for configure, the real configure is in src.
# This script identifies the machine, and creates a directory for
# the installation, where it runs ${srcdir}/configure.
set -e
#if uname -a | grep -i 'mingw32' > /dev/null; then
# srcdir=`pwd -W`/src;

View file

@ -120,7 +120,7 @@ lsp/config.lsp: $(srcdir)/lsp/config.lsp.in Makefile.msvc6
-e "s,@ECL_VERSION@,$(ECL_VERSION),g" \
-e "s,@ARCHITECTURE@,$(ARCHITECTURE),g" \
-e "s,@MACHINE_INSTANCE@,$(MACHINE_INSTANCE),g" \
-e "s,@MACHINE@,$(MACHINE),g" \
-e "s,@MACHINE_VERSION@,$(MACHINE),g" \
-e "s,@SOFTWARE_TYPE@,$(SOFTWARE_TYPE),g" \
-e "s,@SOFTWARE_VERSION@,$(SOFTWARE_VERSION),g" \
-e "s,@thehost@,$(THEHOST),g" \
@ -146,6 +146,7 @@ compile.lsp: bare.lsp $(srcdir)/compile.lsp.in Makefile.msvc6
-e "s,@LDINSTALLNAME@,,g" \
-e "s,@DEF@,$(DEF),g" \
-e "s,@ECL_MODULES@,$(ECL_MODULES),g" \
-e "s,@RANLIB@,ranlib,g" \
< $(srcdir)\compile.lsp.in > compile.lsp
bare.lsp: $(srcdir)/bare.lsp.in lsp/load.lsp clos/load.lsp cmp/load.lsp cmp/cmpcfg.lsp
sed -e "s,@true_srcdir@,$(srcdir:\=/),g" \

View file

@ -26,7 +26,7 @@ CP = copy /Y
ECL_VERSION=0.9d
FILTER = sed "s,@VERSION@,$(ECL_VERSION),g"
FILTER = sed "s,@PACKAGE_VERSION@,$(ECL_VERSION),g"
ECL = ../ecl

View file

@ -102,6 +102,11 @@ ECL 0.9f
OUTPUT-P, OPEN-P}. Care has been taken to ensure compatibility with previous
versions of ECL.
- The configuration and build process have been cleaned, making it closer to
GNU guidelines and improving things like naming of variables. The flags
--with-system-{gmp,boehm} now take an optional argument which can be "auto",
for automatic detection of the libraries (M. Pasternacki).
* ANSI Compatibility:
- DEFSETF forms are enclosed in a block with the name of the accessor.

View file

@ -7,10 +7,14 @@ srcdir = @srcdir@
# Programs used by "make":
#
@SET_MAKE@
CC = @ECL_CC@
LIBS = @STATICLIBS@ @LIBS@ @TKLIBS@ @CLIBS@
LIBS = @LIBS@
FASL_LIBS = @FASL_LIBS@
CORE_LIBS = @CORE_LIBS@
LDFLAGS = @LDFLAGS@
RM = @RM@
LN_S = @LN_S@
EXE = @EXEEXT@
# ==================== Where To Install Things ====================
@ -35,7 +39,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/gc/mkinstalldirs
# Files
SUBDIR = @SUBDIR@
SUBDIRS = @SUBDIRS@
LIBRARIES = @LIBRARIES@
LSP_LIBRARIES = @LSP_LIBRARIES@
ECL_MODULES = @ECL_MODULES@
@ -58,7 +62,7 @@ ecl_min$(EXE): $(LIBRARIES) .gdbinit @LIBPREFIX@eclmin.@LIBEXT@
if [ -f CROSS-COMPILER ]; then \
touch $@; \
else \
$(CC) $(LDFLAGS) -o $@ cinit.o c/all_symbols.o -L./ @LIBPREFIX@eclmin.@LIBEXT@ $(LIBS);\
$(CC) $(LDFLAGS) -o $@ cinit.o c/all_symbols.o -L./ @LIBPREFIX@eclmin.@LIBEXT@ $(CORE_LIBS) $(LIBS) $(FASL_LIBS);\
fi
.gdbinit: $(srcdir)/util/gdbinit
@ -69,64 +73,62 @@ lsp/config.lsp: lsp/config.pre
compile.lsp: compile.pre
sed -e 's,@ecldir@,$(libdir),g' < compile.pre > compile.lsp
ecl-config: ecl-config.pre
sed -e 's,~A,$(libdir),;s,~\*,,' \
-e 's,@libdir\\@,$(libdir),' \
sed -e 's,@libdir\\@,$(libdir),' \
-e 's,@includedir\\@,$(libdir)/h,' ecl-config.pre > ecl-config
@LIBPREFIX@eclmin.@LIBEXT@: @LIBPREFIX@eclgmp.@LIBEXT@ @LIBPREFIX@eclgc.@LIBEXT@ lsp/config.lsp
cd c; $(MAKE)
@LIBPREFIX@eclgc.@LIBEXT@:
if (echo $(SUBDIR) | grep gc); then \
if (echo $(SUBDIRS) | grep gc); then \
cd gc; $(MAKE) install; \
cp -rf $(srcdir)/gc/include/private ../h/gc/; \
mv ../@LIBPREFIX@gc.@LIBEXT@ ../@LIBPREFIX@eclgc.@LIBEXT@; \
fi
@LIBPREFIX@eclgmp.@LIBEXT@:
if (echo $(SUBDIR) | grep gmp); then \
if (echo $(SUBDIRS) | grep gmp); then \
cd gmp; $(MAKE) install; \
mv ../@LIBPREFIX@gmp.@LIBEXT@ ../@LIBPREFIX@eclgmp.@LIBEXT@; \
fi
sysfun.lsp:
ln -s -f $(srcdir)/cmp/sysfun.lsp ./
$(LN_S) $(srcdir)/cmp/sysfun.lsp ./
rt.lisp:
cp $(srcdir)/../contrib/rt/rt.lisp ./
BUILD-STAMP: config.status
(echo "#"; uname -a) > $@
head -8 config.status | tail -6 >> $@
echo "#" `uname -a` > $@
head -8 config.log | tail -6 >> $@
install: BUILD-STAMP install-base
cd c; $(MAKE) prefix=$(prefix) install
cd doc; $(MAKE) prefix=$(prefix) install
install-base:
$(mkinstalldirs) $(bindir) $(libdir)/h
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(libdir)/h
for i in $(TARGETS); do \
$(INSTALL) -s $$i $(bindir); \
$(INSTALL_PROGRAM) -s $$i $(DESTDIR)$(bindir); \
done;
$(INSTALL_SCRIPT) ecl-config $(bindir)
$(INSTALL_SCRIPT) ecl-config $(DESTDIR)$(bindir)
for i in BUILD-STAMP $(LSP_LIBRARIES) $(LIBRARIES) c/dpp* help.doc ; do \
$(INSTALL_DATA) $$i $(libdir); \
$(INSTALL_DATA) $$i $(DESTDIR)$(libdir); \
done
for i in $(ECL_MODULES); do \
$(INSTALL_DATA) $$i.fas $(libdir); \
$(INSTALL_DATA) $$i.fas $(DESTDIR)$(libdir); \
done
$(INSTALL_DATA) h/config.h $(libdir)/h
flatinstall: BUILD-STAMP
$(MAKE) bindir=$(prefix) libdir=$(prefix) install-base
cd c; $(MAKE) prefix=$(prefix) flatinstall
cd doc; $(MAKE) prefix=$(prefix) docdir=$(prefix)/doc flatinstall
uninstall:
for i in $(TARGETS) ecl-config; do rm -rf $(bindir)/$$i; done
rm -rf $(libdir)
for i in $(TARGETS) ecl-config; do $(RM) $(DESTDIR)$(bindir)/$$i; done
$(RM) -r $(DESTDIR)$(libdir)
cd doc; $(MAKE) uninstall
doc: $(TARGETS)
cd doc; $(MAKE)
clean: clean_lisp
for i in ${SUBDIR}; do (cd $$i; $(MAKE) clean); done
for i in $(SUBDIRS); do (cd $$i; $(MAKE) clean); done
$(RM) ecl_min$(EXE) ecl$(EXE) help.doc core a.out
$(RM) config.version config.log config.cache
$(RM) *.c *.o *.a *.h *.data *.fas

96
src/aclocal.m4 vendored
View file

@ -1,18 +1,44 @@
dnl -*- autoconf -*-
dnl --------------------------------------------------------------
dnl Add Lisp library to compile in. Second argument is a hack
dnl to add sysfun.lsp.
dnl
AC_DEFUN([ECL_ADD_LISP_LIBRARY], [
if test ${enable_shared} = "yes" ; then
LSP_LIBRARIES="${LSP_LIBRARIES} $1.fas $2"
else
LSP_LIBRARIES="${LSP_LIBRARIES} ${LIBPREFIX}$1.${LIBEXT} $2"
fi ])
dnl --------------------------------------------------------------
dnl Add lisp module to compile; if second argument is given,
dnl compile module into Lisp library if we don't support shared
dnl libraries.
dnl
AC_DEFUN([ECL_ADD_LISP_MODULE], [
if test ${enable_shared} = "yes" ; then
ECL_MODULES="${ECL_MODULES} $1"
elif test $2; then
LSP_LIBRARIES="${LSP_LIBRARIES} ${LIBPREFIX}$1.${LIBEXT}"
else
AC_MSG_ERROR([Can't compile in $1 without shared library support!])
fi ])
dnl --------------------------------------------------------------
dnl Set up a configuration file for the case when we are cross-
dnl compiling
dnl
AC_DEFUN(ECL_CROSS_CONFIG,[
if test "x${cross_compiling}" = "xyes"; then
if test -n "${cross_config}" -a -f "${cross_config}"; then
. ${cross_config}
if test -n "${with_cross_config}" -a -f "${with_cross_config}"; then
. ${with_cross_config}
elif test -f ./cross_config; then
. ./cross_config
elif test -n "${srcdir}" -a -f ${srcdir}/cross_config; then
. ${srcdir}/cross_config
else
test -z ${cross_config} && cross_config=`pwd`/cross_config
cat > ${cross_config} <<EOF
test -z ${with_cross_config} && cross_config=`pwd`/cross_config
cat > ${with_cross_config} <<EOF
###
### YOU ARE TRYING TO CROSS COMPILE ECL.
### PLEASE FOLLOW THESE INSTRUCTIONS:
@ -56,7 +82,7 @@ ECL_FILE_CNT=0
### the path.
ECL_TO_RUN=`which ecl`
EOF
cat ${cross_config}
cat ${with_cross_config}
AC_MSG_ERROR(Configuration aborted)
fi
if test "${ECL_TO_RUN}" = "failed"; then
@ -131,6 +157,7 @@ AC_SUBST(OBJEXT)dnl These are set by autoconf
AC_SUBST(EXEEXT)
AC_SUBST(LDINSTALLNAME)dnl Link-flag that tells where the library will reside.
AC_SUBST(INSTALL_TARGET)dnl Which type of installation: flat directory or unix like.
AC_SUBST(thehost)
LDRPATH='~*'
SHAREDEXT='so'
SHAREDPREFIX='lib'
@ -139,20 +166,21 @@ LIBEXT='a'
PICFLAG='-fPIC'
LDINSTALLNAME=''
THREAD_CFLAGS=''
THREAD_LDFLAGS=''
THREAD_LIBS=''
THREAD_GC_FLAGS='--enable-threads=posix'
INSTALL_TARGET='install'
THREAD_OBJ='threads'
clibs=''
case "${host_os}" in
# libdir may have a dollar expression inside
linux*)
thehost='linux'
THREAD_CFLAGS='-D_THREAD_SAFE'
THREAD_LDFLAGS='-lpthread'
THREAD_LIBS='-lpthread'
SHARED_LDFLAGS="-shared ${LDFLAGS}"
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
LDRPATH='-Wl,--rpath,~A'
CLIBS="-ldl"
clibs="-ldl"
# Maybe CFLAGS="-D_ISOC99_SOURCE ${CFLAGS}" ???
;;
freebsd*)
@ -160,21 +188,21 @@ case "${host_os}" in
SHARED_LDFLAGS="-shared ${LDFLAGS}"
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
LDRPATH="-Wl,--rpath,~A"
CLIBS=""
clibs=""
;;
netbsd*)
thehost='netbsd'
SHARED_LDFLAGS="-shared ${LDFLAGS}"
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
LDRPATH="-Wl,--rpath,~A"
CLIBS=""
clibs=""
;;
openbsd*)
thehost='openbsd'
SHARED_LDFLAGS="-shared ${LDFLAGS}"
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
LDRPATH="-Wl,--rpath,~A"
CLIBS=""
clibs=""
;;
solaris*)
thehost='sun4sol2'
@ -182,7 +210,7 @@ case "${host_os}" in
BUNDLE_LDFLAGS="-dy -G ${LDFLAGS}"
LDRPATH='-Wl,-R,~A'
TCPLIBS='-lsocket -lnsl -lintl'
CLIBS='-ldl'
clibs='-ldl'
;;
cygwin*)
thehost='cygwin'
@ -195,11 +223,10 @@ case "${host_os}" in
;;
mingw*)
thehost='mingw32'
CLIBS=''
clibs=''
shared='yes'
THREAD_OBJ='threads_win32'
THREAD_CFLAGS='-D_THREAD_SAFE'
THREAD_LDFLAGS=''
THREAD_GC_FLAGS='--enable-threads=win32'
SHARED_LDFLAGS=''
BUNDLE_LDFLAGS=''
@ -219,7 +246,7 @@ case "${host_os}" in
LDRPATH=''
LDINSTALLNAME="-Wl,-install_name,${libdir}/${SHAREDPREFIX}ecl.${SHAREDEXT}"
THREAD_CFLAGS='-D_THREAD_SAFE'
THREAD_LDFLAGS='-lpthread'
THREAD_LIBS='-lpthread'
;;
*)
thehost="$host_os"
@ -228,15 +255,16 @@ case "${host_os}" in
esac
ECL_CFLAGS="-D${thehost}"
AC_MSG_CHECKING(for ld flags when building shared libraries)
if test "${shared}" = "yes"; then
if test "${enable_shared}" = "yes"; then
AC_MSG_RESULT([${SHARED_LDFLAGS}])
CFLAGS="${CFLAGS} ${PICFLAG}"
else
shared="no";
AC_MSG_RESULT(cannot build)
fi
LIBS="${clibs} ${LIBS}"
AC_MSG_CHECKING(for required libraries)
AC_MSG_RESULT([${CLIBS}])
AC_MSG_RESULT([${clibs}])
AC_MSG_CHECKING(for architecture)
AC_MSG_RESULT([${ARCHITECTURE}])
AC_MSG_CHECKING(for software type)
@ -252,24 +280,24 @@ AC_DEFUN(ECL_FILE_STRUCTURE,[
AC_SUBST(ECL_FILE_CNT)
if test -z "${ECL_FILE_CNT}"; then
ECL_FILE_CNT=0
AC_TRY_COMPILE([#include <stdio.h>],[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[
int main() {
FILE *f = fopen("conftestval","w");
if ((f)->_IO_read_end - (f)->_IO_read_ptr)
return 1;
}],ECL_FILE_CNT=1)
AC_TRY_COMPILE([#include <stdio.h>],[
}]])],[ECL_FILE_CNT=1],[])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[
int main() {
FILE *f = fopen("conftestval","w");
if ((f)->_r)
return 1;
}],ECL_FILE_CNT=2)
AC_TRY_COMPILE([#include <stdio.h>],[
}]])],[ECL_FILE_CNT=2],[])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[
int main() {
FILE *f = fopen("conftestval","w");
if ((f)->_cnt)
return 1;
}],ECL_FILE_CNT=3)
}]])],[ECL_FILE_CNT=3],[])
fi
])
@ -281,7 +309,7 @@ dnl
AC_DEFUN(ECL_STACK_DIRECTION,[
AC_MSG_CHECKING(whether stack growns downwards)
if test -z "${ECL_STACK_DIR}" ; then
AC_TRY_RUN([
AC_RUN_IFELSE([AC_LANG_SOURCE([[
char *f2() {
char c;
return &c;
@ -298,12 +326,10 @@ int main() {
else
return 0;
}
],
ECL_STACK_DIR=down,
ECL_STACK_DIR=up,[])
]])],[ECL_STACK_DIR=down],[ECL_STACK_DIR=up],[])
fi
case "${ECL_STACK_DIR}" in
down|DOWN) AC_MSG_RESULT(yes); AC_DEFINE(DOWN_STACK) ;;
down|DOWN) AC_MSG_RESULT(yes); AC_DEFINE(DOWN_STACK, [1], [Stack grows downwards]) ;;
up|UP) AC_MSG_RESULT(no) ;;
*) AC_MSG_ERROR(Unable to determine stack growth direction)
esac])
@ -330,7 +356,7 @@ AC_SUBST(CL_FIXNUM_MAX)
AC_SUBST(CL_FIXNUM_MIN)
AC_MSG_CHECKING(appropiate type for fixnums)
if test -z "${CL_FIXNUM_TYPE}" ; then
AC_TRY_RUN([#include <stdio.h>
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
int main() {
const char *int_type;
int bits;
@ -369,8 +395,7 @@ int main() {
fprintf(f,"CL_FIXNUM_TYPE='%s';",int_type);
fprintf(f,"CL_FIXNUM_BITS='%d'",bits);
exit(0);
}],
eval "`cat conftestval`",[])
}]])],[eval "`cat conftestval`"],[],[])
fi
if test -z "${CL_FIXNUM_TYPE}" ; then
AC_MSG_ERROR(There is no appropiate integer type for the cl_fixnum type)
@ -385,7 +410,7 @@ dnl
AC_DEFUN(ECL_LINEFEED_MODE,[
AC_MSG_CHECKING(character sequence for end of line)
if test -z "${ECL_NEWLINE}" ; then
AC_TRY_RUN([#include <stdio.h>
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
int main() {
FILE *f = fopen("conftestval","w");
int c1, c2;
@ -414,13 +439,12 @@ int main() {
fclose(f);
exit(0);
}
],
ECL_NEWLINE=`cat conftestval`,[],[])
]])],[ECL_NEWLINE=`cat conftestval`],[],[])
fi
case "${ECL_NEWLINE}" in
LF) AC_MSG_RESULT(lf) ;;
CR) AC_MSG_RESULT(cr); AC_DEFINE(ECL_NEWLINE_IS_CR) ;;
CRLF) AC_MSG_RESULT(cr+lf); AC_DEFINE(ECL_NEWLINE_IS_CRLF) ;;
CR) AC_MSG_RESULT(cr); AC_DEFINE(ECL_NEWLINE_IS_CR, [1], [Define if your newline is CR]) ;;
CRLF) AC_MSG_RESULT(cr+lf); AC_DEFINE(ECL_NEWLINE_IS_CRLF, [1], [Define if your newline is CRLF]) ;;
*) AC_MSG_ERROR(Unable to determine linefeed mode) ;;
esac
])

View file

@ -1,3 +1,4 @@
;;; @configure_input@
;;;
;;; This file can be loaded either in ECL_MIN or in the final executable
;;; ECL. In both cases, it ensures that we have a working Common-Lisp

View file

@ -9,7 +9,7 @@ VPATH = @srcdir@
#
TRUE_CC = @CC@
CC = @CC@
CFLAGS = -c -I./ -I$(srcdir) -I$(HDIR) -I../h @BOEHM_HEADERS@ @CFLAGS@ @ECL_CFLAGS@ \
CFLAGS = -c -I./ -I$(srcdir) -I$(HDIR) -I../h @CPPFLAGS@ @CFLAGS@ @ECL_CFLAGS@ \
# -Wall -W -Wfloat-equal -Wundef -Wendif-labels -Wpointer-arith -Wcast-align \
# -Wwrite-strings -Wconversion -Wsign-compare -Wmissing-prototypes -Wredundant-decls \
# -Wunreachable-code -Winline
@ -18,6 +18,7 @@ SHELL = /bin/sh
RM = @RM@
EXE = @EXEEXT@
DPP = ./dpp$(EXE)
RANLIB = @RANLIB@
# Data for installation
#
@ -68,23 +69,23 @@ external.h: $(top_srcdir)/h/external.h
sed 's,__declspec(dllimport),,g' $(top_srcdir)/h/external.h > $@
install: $(HFILES)
for i in $(HFILES); do $(INSTALL_DATA) $$i $(libdir)/h/; done
for i in $(HFILES); do $(INSTALL_DATA) $$i $(DESTDIR)$(libdir)/h/; done
sed '/-CUT-/,$$d' ../h/config.h > ../h/config-install.h
$(INSTALL_DATA) ../h/*.h $(libdir)/h/
rm $(libdir)/h/config.h
mv $(libdir)/h/config-install.h $(libdir)/h/config.h
$(INSTALL_DATA) ../h/*.h $(DESTDIR)$(libdir)/h/
rm $(DESTDIR)$(libdir)/h/config.h
mv $(DESTDIR)$(libdir)/h/config-install.h $(libdir)/h/config.h
flatinstall: $(HFILES)
for i in $(HFILES); do $(INSTALL_DATA) $$i $(prefix)/h/; done
for i in $(HFILES); do $(INSTALL_DATA) $$i $(DESTDIR)$(prefix)/h/; done
sed '/-CUT-/,$$d' ../h/config.h > ../h/config-install.h
$(INSTALL_DATA) ../h/*.h $(prefix)/h/
rm $(prefix)/h/config.h
mv $(prefix)/h/config-install.h $(prefix)/h/config.h
$(INSTALL_DATA) ../h/*.h $(DESTDIR)$(prefix)/h/
rm $(DESTDIR)$(prefix)/h/config.h
mv $(DESTDIR)$(prefix)/h/config-install.h $(prefix)/h/config.h
../libeclmin.a: $(OBJS) all_symbols.o all_symbols2.o
$(RM) $@
ar cr $@ $(OBJS)
ranlib $@
$(RANLIB) $@
clean:
$(RM) dpp *.c *.h $(OBJS) ../libecl.a cinit.o core a.out

View file

@ -44,9 +44,9 @@ typedef struct format_stack_struct {
#endif
#if MOST_NEGATIVE_FIXNUM > INT_MIN
# define FMT_VALUE_UPPER_LIMIT MOST_NEGATIVE_FIXNUM
# define FMT_VALUE_LOWER_LIMIT MOST_NEGATIVE_FIXNUM
#else
# define FMT_VALUE_UPPER_LIMIT INT_MIN
# define FMT_VALUE_LOWER_LIMIT INT_MIN
#endif

View file

@ -1,3 +1,5 @@
;;; @configure_input@
(defconstant +clos-module-files+
'("src:clos;walk.lsp"
"src:clos;macros.lsp"

View file

@ -869,8 +869,8 @@ by every function, which attempts to generate RENDER requests."
;; $Log$
;; Revision 1.13 2005-04-11 08:43:49 jjgarcia
;; DEFCBODY, DEFLA and DEFENTRY reimplemented. DEFVAR and DEFPARAMETER are no longer treated specially by the compiler. Globals declared by DEFPARAMETER toplevel forms are now recognized by the compiler.
;; Revision 1.14 2005-04-12 11:59:36 jjgarcia
;; The build system has been cleaned. The --with-system-* options now can automatically detect the existence of GMP and Boehm-Weiser libraries
;;
;; Revision 1.1 2004/06/10 07:59:31 jlr
;; Portable CLX library imported

View file

@ -1,10 +1,11 @@
;; @configure_input@
;;
;; * Set compiler and compiler flags -- this includes pointing
;; to the directory with our header files.
;;
(in-package "COMPILER")
(setq *cc* "@ECL_CC@")
(setq *cc-flags* "@CFLAGS@ @ECL_CFLAGS@")
(setq *cc-flags* "@CPPFLAGS@ @CFLAGS@ @ECL_CFLAGS@")
(setq *cc-optimize* #-msvc "-O"
#+msvc "-O2")
(setq *ld-format* #-msvc "~A -o ~S -L~S ~{~S ~} ~@?"
@ -12,15 +13,15 @@
(setq *cc-format* #-msvc "~A ~A ~:[~*~;~A~] \"-I~A/h\" -w -c \"~A\" -o \"~A\""
#+msvc "~A ~A ~:[~*~;~A~] -I\"~A/h\" -Zi -W3 -c \"~A\" -Fo\"~A\"")
#-dlopen
(setq *ld-flags* "@LDRPATH@ @LDFLAGS@ -lecl @STATICLIBS@ @CLIBS@")
(setq *ld-flags* "@LDRPATH@ @LDFLAGS@ -lecl @CORE_LIBS@ @LIBS@ @FASL_LIBS@")
#+dlopen
(setq *ld-flags* #-msvc "@LDRPATH@ @LDFLAGS@ -lecl @CLIBS@"
(setq *ld-flags* #-msvc "@LDRPATH@ @LDFLAGS@ -lecl @LIBS@ @FASL_LIBS@"
#+msvc "@LDRPATH@ @LDFLAGS@ ecl.lib @CLIBS@")
#+dlopen
(setq *ld-shared-flags* #-msvc "@LDRPATH@ @SHARED_LDFLAGS@ @LDFLAGS@ -lecl @CLIBS@"
(setq *ld-shared-flags* #-msvc "@LDRPATH@ @SHARED_LDFLAGS@ @LDFLAGS@ -lecl @LIBS@ @FASL_LIBS@"
#+msvc "@LDRPATH@ @SHARED_LDFLAGS@ @LDFLAGS@ ecl.lib @CLIBS@")
#+dlopen
(setq *ld-bundle-flags* #-msvc "@LDRPATH@ @BUNDLE_LDFLAGS@ @LDFLAGS@ -lecl @CLIBS@"
(setq *ld-bundle-flags* #-msvc "@LDRPATH@ @BUNDLE_LDFLAGS@ @LDFLAGS@ -lecl @LIBS@ @FASL_LIBS@"
#+msvc "@LDRPATH@ @BUNDLE_LDFLAGS@ @LDFLAGS@ ecl.lib @CLIBS@")
(eval-when (eval)
(setq +shared-library-prefix+ "@SHAREDPREFIX@"

View file

@ -1,3 +1,5 @@
;;; @configure_input@
(defconstant +cmp-module-files+
'("src:cmp;cmpdefs.lsp"
"src:cmp;cmpmac.lsp"

View file

@ -1,3 +1,4 @@
;;; @configure_input@
;;;
;;; This is the "makefile" file for building ECL. The purpose of this file is
;;; - Compile the core of the Common-Lisp library (lsp, clos)
@ -36,7 +37,7 @@
;;; with an already installed copy of ECL.
;;;
(setq c::*cc-flags*
#-msvc "@CFLAGS@ @ECL_CFLAGS@ -I\"@true_srcdir@\"/h -I\"@true_srcdir@\"/gmp -I\"@true_builddir@\"/h"
#-msvc "@CPPFLAGS@ @CFLAGS@ @ECL_CFLAGS@ -I\"@true_srcdir@\"/h -I\"@true_srcdir@\"/gmp -I\"@true_builddir@\"/h"
#+msvc "@CFLAGS@ @ECL_CFLAGS@ -I\"@true_srcdir@\"/h -I\"@true_builddir@\"/h"
c::*cc-format*
#-msvc "~A ~A ~:[~*~;~A~] -I\"@true_builddir@\"/h~* -w -c ~S -o ~S"
@ -46,14 +47,14 @@
#+msvc "~A -Zi -Fe~S~* ~{~S ~} ~@?")
#-dlopen
(setf c::*ld-flags*
"@LDFLAGS@ @LDRPATH@ @LIBPREFIX@ecl.@LIBEXT@ @STATICLIBS@ @CLIBS@")
"@LDFLAGS@ @LDRPATH@ @LIBPREFIX@ecl.@LIBEXT@ @CORE_LIBS@ @LIBS@ @FASL_LIBS@")
#+dlopen
(setf c::*ld-flags*
"@LDFLAGS@ @LDRPATH@ @SHAREDPREFIX@ecl.@SHAREDEXT@ @CLIBS@"
"@LDFLAGS@ @LDRPATH@ @SHAREDPREFIX@ecl.@SHAREDEXT@ @LIBS@"
c::*ld-shared-flags*
"@LDRPATH@ @SHARED_LDFLAGS@ @LDFLAGS@ @SHAREDPREFIX@ecl.@SHAREDEXT@ @CLIBS@"
"@LDRPATH@ @SHARED_LDFLAGS@ @LDFLAGS@ @SHAREDPREFIX@ecl.@SHAREDEXT@ @LIBS@ @FASL_LIBS@"
c::*ld-bundle-flags*
"@LDRPATH@ @BUNDLE_LDFLAGS@ @LDFLAGS@ @SHAREDPREFIX@ecl.@SHAREDEXT@ @CLIBS@")
"@LDRPATH@ @BUNDLE_LDFLAGS@ @LDFLAGS@ @SHAREDPREFIX@ecl.@SHAREDEXT@ @LIBS@ @FASL_LIBS@")
;;;
;;; * Avoid name clashes with user supplied code.
@ -88,13 +89,13 @@ cp @LIBPREFIX@eclmin.@LIBEXT@ @LIBPREFIX@ecl.@LIBEXT@;
cd tmp; ar -x ../@LIBPREFIX@lsp.@LIBEXT@;
for i in *.@OBJEXT@; do mv $i lsp_`basename $i`; done;
ar -r ../@LIBPREFIX@ecl.@LIBEXT@ *.@OBJEXT@ ../c/all_symbols2.@OBJEXT@; rm *.@OBJEXT@;
ranlib ../@LIBPREFIX@ecl.@LIBEXT@'")
@RANLIB@ ../@LIBPREFIX@ecl.@LIBEXT@'")
#+dlopen
;;;
;;; We do not need the -rpath flag for the library, nor -lecl.
;;;
(let ((c::*ld-shared-flags* #-msvc "@SHARED_LDFLAGS@ @LDFLAGS@ @STATICLIBS@ @CLIBS@"
(let ((c::*ld-shared-flags* #-msvc "@SHARED_LDFLAGS@ @LDFLAGS@ @CORE_LIBS@ @LIBS@ @FASL_LIBS@"
#+msvc "@SHARED_LDFLAGS@ @LDFLAGS@ @STATICLIBS@ @CLIBS@ /DEF:@DEF@")
(c::*cc-flags* (concatenate 'string "-I@true_builddir@/c " c::*cc-flags*)))
(c::shared-cc (compile-file-pathname "ecl" :type :dll)

6448
src/configure vendored

File diff suppressed because it is too large Load diff

View file

@ -7,419 +7,432 @@ dnl
dnl AUTOCONF configuration for ECL
dnl Giuseppe Attardi 25.1.1994
dnl
dnl configure.in ---<autoconf>--->> configure
dnl
dnl _____
dnl configure \
dnl src/h/config.h.in ----<sh>---->> $(machine)/h/config.h
dnl src/*/Makefile.in _____/ $(machine)/*/Makefile
dnl
dnl $(machine)/Makefile ---<make>--->> ecl
dnl
dnl
AC_INIT(configure.in)
AC_PREREQ(2.1) # You must have autoconf version 2.1 or later.
###
### Make sure we do not configure within source directory
###
AC_CONFIG_SRCDIR(CHANGELOG)
AC_CONFIG_AUX_DIR(${srcdir}/gmp)
AC_INIT([ecl],[0.9e],[])
AC_REVISION([$Revision$])
AC_CONFIG_SRCDIR([bare.lsp.in])
AC_CONFIG_AUX_DIR([${srcdir}/gmp])
AC_PREREQ(2.59)
dnl -----------------------------------------------------------------------
dnl Make sure we do not configure within source directory
if test -f configure; then
echo "***"
echo "*** This program cannot be built within the source directory ***"
echo "***"
exit 2;
AC_MSG_ERROR([This program cannot be built within the source directory])
fi
dnl Set the version number. This seems the best place to keep it.
ECL_VERSION=0.9e
AC_SUBST(ECL_VERSION)
dnl -----------------------------------------------------------------------
dnl Configure switches
AC_ARG_WITH(cross_config,
AS_HELP_STRING( [--with-cross-config=f],
[supply configuration for a cross compiler]),
[], [with_cross_config="`pwd`/cross_config"])
AC_ARG_ENABLE(shared,
AS_HELP_STRING( [--enable-shared],
[enable loading compiled files (default=YES)]),
[], [enable_shared=yes])
AC_ARG_ENABLE(threads,
AS_HELP_STRING( [--enable-threads],
[support for native threads (yes|no|auto, default=NO).]),
[], [enable_threads=no])
AC_ARG_ENABLE(boehm,
AS_HELP_STRING( [--enable-boehm],
[use the Boehm-Weiser garbage collector]
[(no|included|system|auto, default=auto)] ),
[], [enable_boehm=auto] )
AC_ARG_ENABLE(local-boehm,
AS_HELP_STRING( [--enable-local-boehm], [Deprecated! See --enable-boehm] ),
[AC_MSG_WARN(
[--enable-local-boehm is deprecated, use --enable-boehm=system instead!])
test ${withval} = "no" || enable_boehm="system"])
AC_ARG_WITH(system-boehm,
AS_HELP_STRING( [--with-system-boehm], [Deprecated! See --enable-boehm] ),
[AC_MSG_WARN(
[--with-system-boehm is deprecated, use --enable-boehm=system instead!])
test ${withval} = "no" || enable_boehm="system"])
AC_ARG_WITH(gmp,
AS_HELP_STRING( [--with-gmp=args],
[supply arguments for configuring GMP library]))
AC_ARG_WITH(system-gmp,
AS_HELP_STRING( [--with-system-gmp],
[use already installed GMP library (default=auto)]),
[], [with_system_gmp="auto"])
AC_ARG_ENABLE(local-gmp,
AS_HELP_STRING( [--enable-local-gmp],
[Deprecated! See --with-system-gmp]),
[AC_MSG_WARN(
[--with-local-gmp is deprecated, use --with-system-gmp instead!])
with_system_gmp="${enableval}"])
AC_ARG_ENABLE(opcode8,
AS_HELP_STRING( [--enable-opcode8],
[interpreter uses 8-bit codes]
[(default=NO, only works on Intel)]),
[opcode8=${enableval}], [opcode8=no])
AC_ARG_WITH(cxx,
AS_HELP_STRING( [--with-cxx],
[build ECL using C++ compiler (default=NO)]),
[], [with_cxx=no])
AC_ARG_WITH(tcp,
AS_HELP_STRING( [--with-tcp],
[include socket interface (default=NO)]),
[], [with_tcp=no])
AC_ARG_WITH(clx,
AS_HELP_STRING( [--with-clx],
[include CLX library (default=NO)]),
[], [with_clx=no])
AC_ARG_WITH(clos-streams,
AS_HELP_STRING( [--with-clos-streams],
[user defined stream objects (default=YES)]),
[], [with_clos_streams=yes])
AC_ARG_WITH(cmuformat,
AS_HELP_STRING( [--with-cmuformat],
[use CMUCL's FORMAT routine (default=YES)]),
[], [with_cmuformat=${with_clos_streams}])
AC_ARG_WITH(asdf,
AS_HELP_STRING( [--with-asdf],
[include ASDF building facility]
[(default=YES if shared library support is on)]),
[], [with_asdf=${enable_shared}])
dnl -----------------------------------------------------------------------
dnl Installation directories
libdir="${libdir}/ecl"
includedir="${libdir}/ecl/h"
test -z "${docdir}" && docdir="${datadir}/doc/ecl"
AC_SUBST([docdir])
dnl -----------------------------------------------------------------------
dnl Initialize variables.
boehm_configure_flags=""
AC_EXEEXT dnl Guess whether .exe is needed for executables
AC_SUBST(ECL_CFLAGS) dnl Similar, but specific to ECL (see src/util/ecl-config)
AC_SUBST(FASL_LIBS) dnl Libraries to link into all ecl code but not
dnl into helper programs.
AC_SUBST(CORE_LIBS, []) dnl Locally compiled libs to link into
dnl ecl/ecl_min/libecl.so and nowhere else.
AC_SUBST(SHARED_LDFLAGS) dnl Flags for shared libraries linker
AC_SUBST(BUNDLE_LDFLAGS) dnl Flags for FASL files linker
AC_SUBST(SHORT_SITE_NAME) dnl Short name for the machine we built this on
AC_SUBST(LONG_SITE_NAME) dnl Long name for the machine we built this on
AC_SUBST(EXTRA_OBJS) dnl Extra *.o files to be compiled into libecl.a
AC_SUBST(TARGETS, [ecl${EXEEXT}]) 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(ECL_MODULES, []) dnl Contributed modules to be built in
dnl -----------------------------------------------------------------------
dnl Guess operating system of host. We do not allow cross-compiling.
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_SUBST(thehost)
AC_SUBST(bindir)
AC_SUBST(mandir)
AC_SUBST(infodir)
AC_SUBST(builddir)
AC_SUBST(libdir)
AC_SUBST(docdir)
AC_SUBST(top_srcdir)
dnl AC_ARG_ENABLE(tk,
dnl [--enable-tk Include Tk.],
dnl tk="$enable_tk")
AC_ARG_ENABLE(boehm,
AS_HELP_STRING([--enable-boehm],
[use the Boehm-Weiser garbage collector (default=YES)]),
[boehm="${enableval}"], [boehm=yes])
AC_ARG_ENABLE(local-boehm,
AS_HELP_STRING([--enable-local-boehm], [Deprecated! See --with-system-boehm]),
[system_boehm="${enableval}" boehm="yes"])
AC_ARG_ENABLE(local-gmp,
AS_HELP_STRING([--enable-local-gmp], [Deprecated! See --with-system-gmp]),
[system_gmp="${enableval}"])
dnl AC_ARG_ENABLE(locative,
dnl [--enable-locative Include locative support.],
dnl locative="$enable_locative")
AC_ARG_ENABLE(opcode8,
AS_HELP_STRING([--enable-opcode8],
[interpreter uses 8-bit codes (default=NO, only works on Intel)]),
[opcode8=${enableval}], [opcode8=no])
dnl AC_ARG_ENABLE(runtime,
dnl [--enable-runtime Build no compiler.],
dnl runtime="$enable_runtime")
AC_ARG_ENABLE(shared,
AS_HELP_STRING([--enable-shared],
[enable loading compiled files (default=YES)]),
[shared="$enable_shared"], [shared=yes])
AC_ARG_ENABLE(threads,
AS_HELP_STRING([--enable-threads],
[support for native threads (default=NO).]),
[threads="$enable_threads"])
AC_ARG_WITH(asdf,
AS_HELP_STRING([--with-asdf],
[include ASDF building facility (default=YES)]),
[asdf="${withval}"],[asdf=yes])
AC_ARG_WITH(cross_config,
AS_HELP_STRING([--with-config-file=f],
[supply configuration for a cross compiler]),
[cross_config="${withval}"], [cross_config="`pwd`/cross_config"])
dnl AC_ARG_WITH(oldloop,
dnl AS_HELP_STRING([--with-oldloop],[use the old MIT LOOP macro (default=NO)]),
dnl oldloop="yes")
AC_ARG_WITH(cmuformat,
AS_HELP_STRING([--with-cmuformat],
[use CMUCL's FORMAT routine (default=YES)]),
[cmuformat="${withval}"], [cmuformat=yes])
AC_ARG_WITH(clos-streams,
AS_HELP_STRING([--with-clos-streams],
[user defined stream objects (default=YES)]),
[closstreams="${withval}"], [closstreams=yes])
AC_ARG_WITH(clx,
AS_HELP_STRING([--with-clx],
[include CLX library (default=NO)]),
[clx="${withval}"],[clx=no])
AC_ARG_WITH(cxx,
AS_HELP_STRING([--with-cxx],
[build ECL using C++ compiler (default=NO)]),
[usecxx="${withval}"], [usecxx=no])
AC_ARG_WITH(gmp,
AS_HELP_STRING([--with-gmp=args],
[supply arguments for configuring GMP library]),
[gmp_flags=${withval}; system_gmp=no], [gmp_flags=""])
AC_ARG_WITH(tcp,
AS_HELP_STRING([--with-tcp],
[include socket interface (default=NO)]),
[tcp="${withval}"],[tcp=no])
AC_ARG_WITH(system-boehm,
AS_HELP_STRING([--with-system-boehm],
[use already installed Boehm GC library (default=NO)]),
[system_boehm="${enableval}" boehm="yes"], [system_boehm="${system_boehm:-no}"])
AC_ARG_WITH(system-gmp,
AS_HELP_STRING([--with-system-gmp],
[use already installed GMP library (default=NO)]),
[system_gmp="${withval}"], [system_gmp="${system_gmp:-no}"])
### ----------------------------------------------------------------------
### Checks for programs
###
dnl =====================================================================
dnl Checks for programs
AC_PROG_CC # sets variable CC
AC_PROG_CXX # sets variable CXX
AC_PROG_CPP # sets variable CPP
AC_PROG_RANLIB # sets variable RANLIB
AC_PROG_INSTALL # sets variables INSTALL, INSTALL_DATA, INSTALL_PROGRAM
AC_PROG_LN_S # sets variable LN_S
AC_EXEEXT dnl Guess whether .exe is needed for executables
AC_SUBST(ECL_CC)dnl Which compiler should we use for building ECL
AC_SUBST(CFLAGS)dnl Flags for the compiler
AC_SUBST(ECL_CFLAGS)dnl Similar, but specific to ECL (see src/util/ecl-config)
AC_SUBST(CLIBS)dnl System & ECL libraries to be linked in
AC_SUBST(STATICLIBS)dnl Libraries used when linking ECL statically
AC_SUBST(LDFLAGS)dnl Flags for program linker
AC_SUBST(SHARED_LDFLAGS)dnl Flags for shared libraries linker
AC_SUBST(BUNDLE_LDFLAGS)dnl Flags for FASL files linker
AC_SUBST(SHORT_SITE_NAME)dnl Short name for the machine we built this on
AC_SUBST(LONG_SITE_NAME)dnl Long name for the machine we built this on
AC_SUBST(EXTRA_OBJS)dnl Extra *.o files to be compiled into libecl.a
AC_SUBST(TARGETS)dnl Versions of ECL to be built
AC_SUBST(TKLIBS)dnl Libraries with the Tcl/Tk components
AC_SUBST(SUBDIR)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(BOEHM_HEADERS)dnl Header path for Boehm GC
AC_SUBST(ECL_MODULES)dnl Contributed modules to be built in
AC_PROG_MAKE_SET # set $(MAKE) if needed
dnl ----------------------------------------------------------------------
dnl checks for UNIX variants that set DEFS
dnl
AC_CHECK_LIB(sun, getpwnam) # on IRIX adds -lsun
dnl -----------------------------------------------------------------------
dnl Checks which do not come with autoconf (must be after AC_PROG_CC)
ECL_MAKE_ABSOLUTE_SRCDIR
ECL_CROSS_CONFIG
ECL_GUESS_HOST_OS
dnl ----------------------------------------------------------------------
dnl checks for header files
dnl
dnl AC_CHECK_HEADERS(unistd.h stdlib.h stdarg.h string.h)
AC_CHECK_HEADERS(sys/resource.h sys/utsname.h float.h pwd.h dlfcn.h link.h\
mach-o/dyld.h ulimit.h dirent.h sys/ioctl.h)
AC_CHECK_FUNCS(nanosleep alarm times isnanf select setenv putenv\
lstat mkstemp sigprocmask)
AC_ISC_POSIX
dnl ----------------------------------------------------------------------
dnl Installation directories
dnl
libdir="${libdir}/ecl"
includedir="${libdir}/ecl/h"
if test -z "${docdir}"; then docdir="${datadir}/doc/ecl"; fi
dnl ----------------------------------------------------------------------
dnl Checks which do not come with autoconf
dnl
ECL_MAKE_ABSOLUTE_SRCDIR()
ECL_CROSS_CONFIG()
ECL_GUESS_HOST_OS()
ECL_LINEFEED_MODE()
ECL_FIND_SETJMP()
ECL_FILE_STRUCTURE()
dnl ------------------------------------------------------------
dnl Find out how to install the INFO files.
dnl
AC_SUBST(INFOEXT)
AC_SUBST(INSTALL_INFO)
AC_PATH_PROG([INSTALL_INFO], [install-info], [foo], [$PATH:/sbin:/usr/sbin:/usr/etc])
AC_PATH_PROG([INSTALL_INFO], [install-info], [/bin/true], [$PATH:/sbin:/usr/sbin:/usr/etc])
if test -z `which gzip`; then
INFOEXT=info.gz
else
INFOEXT=info
fi
dnl =====================================================================
dnl Checks for libraries
LIBS="${LIBS} -lm"
AC_CHECK_LIB(sun, getpwnam) # on IRIX adds -lsun
AC_ISC_POSIX
dnl ----------------------------------------------------------------------
dnl Set options
dnl
gc_flags=""
TARGETS="ecl${EXEEXT}"
LIBRARIES=""
SUBDIR=c
CLIBS="${CLIBS} -lm"
STATICLIBS=""
ECL_MODULES=""
if test ${boehm} = "no" ; then
dnl Native thread support
if test "${enable_threads}" = "auto"; then
AC_MSG_CHECKING([for threads support])
if test -z "${THREAD_OBJ}"; then
AC_MSG_RESULT([no])
enable_threads="no"
else
AC_MSG_RESULT([yes])
enable_threads="yes"
fi
fi
if test "${enable_threads}" = "yes" ; then
if test -z "${THREAD_OBJ}"; then
AC_MSG_ERROR([Threads aren't supported on this system.])
else
boehm_configure_flags="${boehm_configure_flags} ${THREAD_GC_FLAGS}"
EXTRA_OBJS="${EXTRA_OBJS} ${THREAD_OBJ}.${OBJEXT}"
LIBS="${THREAD_LIBS} ${LIBS}"
CFLAGS="${CFLAGS} ${THREAD_CFLAGS}"
AC_DEFINE( [ECL_THREADS], [1], [Userland threads?])
fi
else
boehm_configure_flags="${boehm_configure_flags} --disable-threads"
fi
dnl ----------------------------------------------------------------------
dnl Boehm-Weiser garbage collector
if test ${enable_boehm} = "no" ; then
EXTRA_OBJS="${EXTRA_OBJS} alloc.${OBJEXT} gbc.${OBJEXT}"
else
if test ${system_boehm} = "yes"; then
BOEHM_HEADERS=""
CLIBS="-lgc ${CLIBS}"
if test ${enable_boehm} = "auto"; then
AC_CHECK_LIB( [gc], [GC_malloc],
[enable_boehm="system"], [enable_boehm="included"])
fi
if test ${enable_boehm} = "system"; then
AC_CHECK_LIB( [gc], [GC_malloc],
[FASL_LIBS="${FASL_LIBS} -lgc"],
[AC_MSG_ERROR([System Boehm GC library requested but not found.])])
AC_MSG_CHECKING( [if we need to copy GC private headers] )
else
SUBDIR="${SUBDIR} gc"
BOEHM_HEADERS="-I../include"
STATICLIBS="-leclgc"
if test ${shared} = "no"; then
enable_boehm="included"
SUBDIRS="${SUBDIRS} gc"
CFLAGS="-I../include ${CFLAGS}"
CORE_LIBS="-leclgc ${CORE_LIBS}"
if test "${enable_shared}" = "no"; then
LIBRARIES="${LIBRARIES} ${LIBPREFIX}eclgc.${LIBEXT}"
fi
fi
EXTRA_OBJS="${EXTRA_OBJS} alloc_2.${OBJEXT}"
AC_DEFINE(GBC_BOEHM)
AC_DEFINE(GBC_BOEHM, [1], [Use Boehm's garbage collector])
fi
if test ${shared} = "yes"; then
AC_DEFINE(ENABLE_DLOPEN)
dnl ----------------------------------------------------------------------
dnl GNU multiprecision library
if test ${with_system_gmp} = "auto"; then
AC_CHECK_LIB( [gmp], [__gmpz_init],
[with_system_gmp=yes], [with_system_gmp=no] )
fi
if test "${with_system_gmp}" = "yes"; then
AC_CHECK_LIB( [gmp], [__gmpz_init],
[FASL_LIBS="${FASL_LIBS} -lgmp"],
[AC_MSG_ERROR([System gmp library requested but not found.])])
else
SUBDIRS="${SUBDIRS} gmp"
CORE_LIBS="-leclgmp ${CORE_LIBS}"
if test ${enable_shared} = "no"; then
LIBRARIES="${LIBRARIES} ${LIBPREFIX}eclgmp.${LIBEXT}"
fi
fi
dnl =====================================================================
dnl Checks for header files
dnl !!! autoscan
AC_PATH_X
AC_HEADER_DIRENT
AC_HEADER_STDBOOL
AC_HEADER_STDC
AC_HEADER_TIME
AC_CHECK_HEADERS( [fcntl.h inttypes.h limits.h netdb.h netinet/in.h] \
[stddef.h stdlib.h string.h sys/param.h] \
[sys/socket.h sys/time.h unistd.h] )
dnl !!! end autoscan
AC_CHECK_HEADERS( [sys/resource.h sys/utsname.h float.h pwd.h dlfcn.h link.h] \
[mach-o/dyld.h ulimit.h dirent.h sys/ioctl.h])
dnl =====================================================================
dnl Checks for typedefs, structures, and compiler characteristics.
dnl !!! autoscan
AC_C_CONST dnl !!! DNLed
AC_C_INLINE
AC_TYPE_SIZE_T dnl !!! DNLed
AC_STRUCT_TM
AC_C_VOLATILE
AC_CHECK_TYPES([ptrdiff_t])
dnl !!! end autoscan
dnl !!! dnled in original
dnl AC_TYPE_PID_T # DEFS pid_t
dnl AC_TYPE_UID_T # DEFS uid_t, gid_t
dnl AC_TYPE_OFF_T # DEFS off_t
dnl AC_C_CHAR_UNSIGNED # DEFS __CHAR_UNSIGNED__ if char is unsigned
dnl !!! end dnled
AC_C_BIGENDIAN([], [],
[AC_DEFINE(WORDS_BIGENDIAN, [/* EDIT! - Undefine if small endian */])])
dnl ----------------------------------------------------------------------
dnl This flag is an optimization for GNU
if test "${GCC}" = "yes"; then
CFLAGS="${CFLAGS} -fstrict-aliasing"
fi
ECL_LINEFEED_MODE
ECL_FIND_SETJMP
ECL_FILE_STRUCTURE
dnl -----------------------------------------------------------------------
dnl Study the call conventions
ECL_STACK_DIRECTION
dnl ----------------------------------------------------------------------
dnl Check the appropiate type for cl_fixnum/cl_index
ECL_FIXNUM_TYPE
dnl =====================================================================
dnl Checks for library functions
dnl !!! autoscan
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_ERROR_AT_LINE
AC_FUNC_FORK
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_FUNC_MMAP
AC_FUNC_REALLOC
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIGNAL
AC_FUNC_STAT
AC_FUNC_STRTOD
AC_CHECK_FUNCS( [floor getcwd gethostbyaddr gethostbyname getpagesize] \
[memmove memset mkdir putenv socket sqrt] \
[strcasecmp strchr strerror strtol] )
dnl !!! end autoscan
AC_CHECK_FUNCS( [nanosleep alarm times isnanf select setenv putenv] \
[lstat mkstemp sigprocmask] )
dnl =====================================================================
dnl Checks for system services
dnl =====================================================================
dnl Final pass over configuration files
dnl
dnl Notice that we build ${builddir}/h/configpre.h from ${srcdir}/h/config.h.in,
dnl and then use all AC_DEF* to build h/config.h from h/configpre.h
dnl ----------------------------------------------------------------------
dnl Do we use C or C++ compiler to compile ecl?
if test ${with_cxx} = "no" ; then
AC_SUBST([ECL_CC], [${CC}])
else
AC_SUBST([ECL_CC], [${CXX}])
boehm_configure_flags="${boehm_configure_flags} --enable-cplusplus"
fi
dnl ----------------------------------------------------------------------
dnl Do we need to have 8-bit opcodes?
if test ! ${opcode8} = "no" ; then
AC_DEFINE( ECL_SMALL_BYTECODES, [1],
[Bytecodes and arguments are 8 and 16 bits large, respectively])
fi
dnl ----------------------------------------------------------------------
dnl Lisp library and libecl features
if test ${enable_shared} = "yes"; then
AC_DEFINE(ENABLE_DLOPEN, [1], [Allow loading dynamically linked code])
LSP_LIBRARIES="${SHAREDPREFIX}ecl.${SHAREDEXT}"
else
LSP_LIBRARIES="${LIBPREFIX}ecl.${LIBEXT}"
LDRPATH='~*'
fi
if test "${system_gmp}" = "yes" ; then
CLIBS="-lgmp ${CLIBS}"
else
SUBDIR="${SUBDIR} gmp"
STATICLIBS="-leclgmp ${STATICLIBS}"
if test ${shared} = "no"; then
LIBRARIES="${LIBRARIES} ${LIBPREFIX}eclgmp.${LIBEXT}"
fi
if test "${with_cmuformat}" = "yes"; then
with_clos_streams="yes"
AC_DEFINE(ECL_CMU_FORMAT, [1], [Use CMU Common-Lisp's FORMAT routine])
fi
if test ${runtime} ; then
AC_DEFINE(RUNTIME)
else
if test ${shared} = "yes" ; then
LSP_LIBRARIES="${LSP_LIBRARIES} cmp.fas sysfun.lsp"
else
LSP_LIBRARIES="${LSP_LIBRARIES} ${LIBPREFIX}cmp.${LIBEXT} sysfun.lsp"
fi
if test "${with_clos_streams}" = "yes"; then
AC_DEFINE( ECL_CLOS_STREAMS, [1],
[Allow STREAM operations to work on arbitrary objects])
fi
dnl if test ${tk} ; then
dnl TKLIBS="-ltk -ltcl -lXpm @XLIBS@"
dnl AC_DEFINE(TK)
dnl fi
ECL_ADD_LISP_LIBRARY([cmp], [sysfun.lsp])
AC_SUBST(CLX_INFO)
if test ${clx} = "yes"; then
tcp = "yes"
if test ${shared} = "yes" ; then
LSP_LIBRARIES="${LSP_LIBRARIES} clx.fas"
else
LSP_LIBRARIES="${LSP_LIBRARIES} ${LIBPREFIX}clx.${LIBEXT}"
fi
AC_DEFINE(CLX)
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 "${tcp}" = "yes"; then
AC_DEFINE(TCP)
if test "${with_tcp}" = "yes"; then
AC_DEFINE(TCP, [1], [Network streams])
EXTRA_OBJS="${EXTRA_OBJS} tcp.${OBJEXT}"
if test ${shared} = "yes" ; then
ECL_MODULES="${ECL_MODULES} sockets"
else
LSP_LIBRARIES="${LSP_LIBRARIES} ${LIBPREFIX}sockets.${LIBEXT}"
fi
CLIBS="${CLIBS} ${TCPLIBS}"
ECL_ADD_LISP_MODULE([sockets], [yes])
LIBS="${LIBS} ${TCPLIBS}"
fi
if test "${oldloop}"; then
AC_DEFINE(ECL_OLD_LOOP)
fi
if test "${cmuformat}" = "yes"; then
closstreams="yes"
AC_DEFINE(ECL_CMU_FORMAT)
fi
if test "${closstreams}" = "yes"; then
AC_DEFINE(ECL_CLOS_STREAMS)
fi
if test "${locative}" ; then
EXTRA_OBJS="${EXTRA_OBJS} unify.${OBJEXT}"
AC_DEFINE(LOCATIVE)
fi
AC_MSG_CHECKING(for threads support)
if test "${threads}" ; then
if test -z "${THREAD_OBJ}"; then
gc_flags="${gc_flags} --disable-threads"
threads='';
AC_MSG_RESULT(no)
else
gc_flags="${gc_flags} ${THREAD_GC_FLAGS}"
EXTRA_OBJS="${EXTRA_OBJS} ${THREAD_OBJ}.${OBJEXT}"
CLIBS="${THREAD_LDFLAGS} ${CLIBS}"
CFLAGS="${CFLAGS} ${THREAD_CFLAGS}"
AC_DEFINE(ECL_THREADS)
AC_MSG_RESULT(native threads)
fi
else
AC_MSG_RESULT(disabled)
gc_flags="${gc_flags} --disable-threads"
fi
if test ${usecxx} = "no" ; then
ECL_CC="${CC}"
else
ECL_CC="${CXX}"
gc_flags="${gc_flags} --enable-cplusplus"
fi
if test ! ${opcode8} = "no" ; then
AC_DEFINE(ECL_SMALL_BYTECODES)
fi
if test "${asdf}" = "yes"; then
ECL_MODULES="${ECL_MODULES} asdf";
fi
dnl ---------------------------------------------------------------------
dnl This flag is an optimization for GNU
dnl ---------------------------------------------------------------------
if test "${GCC}" = "yes"; then
CFLAGS="${CFLAGS} -fstrict-aliasing"
if test "${with_asdf}" = "yes"; then
ECL_ADD_LISP_MODULE([asdf])
fi
dnl ----------------------------------------------------------------------
dnl Study the call conventions
dnl
ECL_STACK_DIRECTION()
dnl ---------------------------------------------------------------------
dnl Check the appropiate type for cl_fixnum/cl_index
dnl
ECL_FIXNUM_TYPE()
dnl # DEFS HAVE_UNISTD_H, HAVE_STDLIB_H, HAVE_STDARG_H
dnl # and HAVE_STRING_H
dnl AC_DIR_HEADER # directory reading functions, DEFS VOID_CLOSEDIR
dnl
dnl checks for typedefs
dnl
dnl AC_TYPE_SIZE_T # DEFS size_t
dnl AC_TYPE_PID_T # DEFS pid_t
dnl AC_TYPE_UID_T # DEFS uid_t, gid_t
dnl AC_TYPE_OFF_T # DEFS off_t
dnl
dnl checks for functions and declarations
dnl
dnl checks for compiler characteristics
dnl
AC_C_BIGENDIAN([AC_DEFINE(WORDS_BIGENDIAN)],
[],[AC_DEFINE(WORDS_BIGENDIAN,[/* EDIT!!! - Undefine if small endian */])])
dnl AC_C_CONST # DEFS const
dnl AC_C_CHAR_UNSIGNED # DEFS __CHAR_UNSIGNED__ if char is unsigned
dnl ---------------------------------------------------------------------
dnl X11 stuff
dnl
dnl AC_PATH_X
dnl AC_PATH_XTRA
dnl XINCLUDES=""
dnl XLIBS=""
dnl if test "$x_includes" != ""; then
dnl XINCLUDES=-I$x_includes
dnl fi
dnl if test "$x_libraries" != ""; then
dnl XLIBS="-L$x_libraries"
dnl fi
dnl AC_SUBST(XINCLUDES)
dnl AC_SUBST(XLIBS)
dnl XLIBS="$XLIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
dnl ---------------------------------------------------------------------
dnl GNU multiprecision library
dnl
AC_MSG_CHECKING(for gmp...)
if test "${system_gmp}" = "yes" ; then
AC_MSG_RESULT(already installed)
else
AC_MSG_RESULT(configuring local copy)
test -d gmp && rm -rf gmp
if mkdir gmp; then
(destdir=`${PWDCMD}`; cd gmp; CC="${CC} ${PICFLAG}" \
$srcdir/gmp/configure --disable-shared --prefix=${destdir} \
--infodir=${destdir}/doc --includedir=${destdir}/h \
--libdir=${destdir} --build=${build_alias} --host=${host_alias} $gmp_flags)
fi
fi
dnl ---------------------------------------------------------------------
dnl Boehm-Weiser garbage collector
dnl
AC_MSG_CHECKING(for Boehm-Weiser gc...)
if test ${boehm} = "no"; then
AC_MSG_RESULT(use small collector instead)
elif test "${system_boehm}" != "yes" ; then
AC_MSG_RESULT(configuring local copy)
dnl Configure included Boehm GC if needed
if test ${enable_boehm} = "included"; then
AC_MSG_NOTICE([Configuring included Boehm GC library:])
test -d gc && rm -rf gc
if mkdir gc; then
(destdir=`${PWDCMD}`; cd gc; CC="${CC} ${PICFLAG}" \
$srcdir/gc/configure --disable-shared --prefix=${destdir} \
--includedir=${destdir}/h --libdir=${destdir} --build=${build_alias} \
--host=${host_alias} ${gc_flags})
--host=${host_alias} ${boehm_configure_flags})
fi
else
AC_MSG_RESULT(already installed)
fi
dnl ---------------------------------------------------------------------
dnl Final pass over configuration files
dnl
dnl Notice that we build ${builddir}/h/configpre.h fron ${srcdir}/h/config.h.in,
dnl and then use all AC_DEF* to build h/config.h from h/configpre.h
dnl
AC_CONFIG_FILES(bare.lsp cmp/cmpcfg.lsp lsp/load.lsp clos/load.lsp cmp/load.lsp
../Makefile Makefile c/Makefile doc/Makefile doc/ecl.man
tests/Makefile ansi-tests/Makefile gabriel/Makefile)
AC_CONFIG_FILES([ecl-config.pre:util/ecl-config])
AC_CONFIG_FILES([h/configpre:h/config.h.in])
AC_CONFIG_FILES([lsp/config.pre:lsp/config.lsp.in])
AC_CONFIG_FILES([compile.pre:compile.lsp.in])
AC_CONFIG_HEADER([h/config.h:h/configpre])
dnl ----------------------------------------------------------------------
dnl Configure local GMP if needed
if test "${with_system_gmp}" = "no" ; then
AC_MSG_NOTICE(Configuring included GMP library:)
test -d gmp && rm -rf gmp
if mkdir gmp; then
(destdir=`${PWDCMD}`; cd gmp; CC="${CC} ${PICFLAG}" \
$srcdir/gmp/configure --disable-shared --prefix=${destdir} \
--infodir=${destdir}/doc --includedir=${destdir}/h \
--libdir=${destdir} --build=${build_alias} --host=${host_alias} $with_gmp)
fi
fi
AC_CONFIG_FILES([
bare.lsp cmp/cmpcfg.lsp lsp/load.lsp clos/load.lsp cmp/load.lsp
../Makefile Makefile c/Makefile doc/Makefile doc/ecl.man
tests/Makefile ansi-tests/Makefile gabriel/Makefile
h/configpre.h:h/config.h.in ecl-config.pre:util/ecl-config
lsp/config.pre:lsp/config.lsp.in compile.pre:compile.lsp.in ])
AC_CONFIG_HEADERS([h/config.h:h/configpre.h]) # FIXME
AC_OUTPUT

View file

@ -19,7 +19,7 @@ INFO_FILES = ecl.$(INFOEXT) ecldev.$(INFOEXT) @CLX_INFO@
HTML_FILES = index.html license.html lgpl.html news.html benchmark.html \
install.html download.html
VERSION=@ECL_VERSION@
VERSION=@PACKAGE_VERSION@
FILTER = sed 's,@VERSION@,$(VERSION),g'
@ -42,38 +42,38 @@ clx.ps: clx.dvi
dvips -o $@ clx.dvi
install: all
$(mkinstalldirs) $(infodir)
$(mkinstalldirs) $(DESTDIR)$(infodir)
for k in $(INFO_FILES); do \
$(INSTALL_DATA) $$k $(infodir); \
$(INSTALL_DATA) $$k $(DESTDIR)$(infodir); \
if [ -x $(INSTALL_INFO) ]; then \
$(INSTALL_INFO) --info-dir=$(infodir) $$k; \
$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) $$k; \
fi; \
done
$(mkinstalldirs) $(docdir)
$(mkinstalldirs) $(DESTDIR)$(docdir)
for i in Copyright LGPL; do \
$(INSTALL_DATA) $(top_srcdir)/../$$i $(docdir); \
$(INSTALL_DATA) $(top_srcdir)/../$$i $(DESTDIR)$(docdir); \
done
$(mkinstalldirs) $(mandir)/man$(manext)
$(INSTALL_DATA) ecl.man $(mandir)/man$(manext)/ecl.$(manext)
$(mkinstalldirs) $(DESTDIR)$(mandir)/man$(manext)
$(INSTALL_DATA) ecl.man $(DESTDIR)$(mandir)/man$(manext)/ecl.$(manext)
flatinstall: all
$(mkinstalldirs) $(docdir)
for k in $(INFO_FILES); do $(INSTALL_DATA) $$k $(docdir); done
$(mkinstalldirs) $(DESTDIR)$(docdir)
for k in $(INFO_FILES); do $(INSTALL_DATA) $$k $(DESTDIR)$(docdir); done
if [ -f user.html ]; then \
$(INSTALL_DATA) $$i $(docdir)/; \
$(INSTALL_DATA) $$i $(DESTDIR)$(docdir)/; \
else \
$(mkinstalldirs) $(docdir)/ecl; \
for i in ecl/*; do $(INSTALL_DATA) $$i $(docdir)/ecl/; done; \
$(mkinstalldirs) $(DESTDIR)$(docdir)/ecl; \
for i in ecl/*; do $(INSTALL_DATA) $$i $(DESTDIR)$(docdir)/ecl/; done; \
fi
if [ -f devel.html ]; then \
$(INSTALL_DATA) devel.html $(docdir)/; \
$(INSTALL_DATA) devel.html $(DESTDIR)$(docdir)/; \
else \
$(mkinstalldirs) $(docdir)/ecldev; \
for i in ecldev/*; do $(INSTALL_DATA) $$i $(docdir)/ecldev/; done; \
$(mkinstalldirs) $(DESTDIR)$(docdir)/ecldev; \
for i in ecldev/*; do $(INSTALL_DATA) $$i $(DESTDIR)$(docdir)/ecldev/; done; \
fi
for i in Copyright LGPL; do \
$(INSTALL_DATA) $(top_srcdir)/../$$i $(docdir); \
$(INSTALL_DATA) $(top_srcdir)/../$$i $(DESTDIR)$(docdir); \
done
for i in *.html; do $(INSTALL_DATA) $$i $(docdir)/; done
for i in *.html; do $(INSTALL_DATA) $$i $(DESTDIR)$(docdir)/; done
uninstall:
for k in $(INFO_FILES); do \
@ -82,8 +82,8 @@ uninstall:
$(INSTALL_INFO) --delete $$k; \
fi; \
done
rm -r $(infodir)/ecl.$(INFOEXT) $(infodir)/ecldev.$(INFOEXT); \
rm $(mandir)/man$(manext)/ecl.$(manext)
rm -r $(DESTDIR)$(infodir)/ecl.$(INFOEXT) $(DESTDIR)$(infodir)/ecldev.$(INFOEXT); \
rm $(DESTDIR)$(mandir)/man$(manext)/ecl.$(manext)
head: developers_manual user_manual $(srcdir)/head
if [ -f ecl/index.html ]; then \

View file

@ -1,6 +1,9 @@
top_srcdir=@top_srcdir@
srcdir=@srcdir@
@SET_MAKE@
LN_S = @LN_S@
FILES = CMUCLc ECLc CLISPc CMUCLi ECLi CLISPi
LISP ?= ../ecl -dir `pwd`/../
NAME ?= ECLc
@ -15,17 +18,17 @@ BENCHMARK: $(FILES)
| ../ecl ; cat BENCHMARK
CMUCLi:
make test LISP="lisp" NAME=CMUCLi COMPILE="NIL"
$(MAKE) test LISP="lisp" NAME=CMUCLi COMPILE="NIL"
CMUCLc:
make test LISP="lisp" NAME=CMUCLc COMPILE="T"
$(MAKE) test LISP="lisp" NAME=CMUCLc COMPILE="T"
CLISPi:
make test LISP="clisp -a" NAME=CLISPi COMPILE="NIL"
$(MAKE) test LISP="clisp -a" NAME=CLISPi COMPILE="NIL"
CLISPc:
make test LISP="clisp -a" NAME=CLISPc COMPILE="T"
$(MAKE) test LISP="clisp -a" NAME=CLISPc COMPILE="T"
ECLi:
make test NAME=ECLi COMPILE="NIL"
$(MAKE) test NAME=ECLi COMPILE="NIL"
ECLc: ../h/ecl.h
make test NAME=ECLc COMPILE="T"
$(MAKE) test NAME=ECLc COMPILE="T"
test:
(echo "(load \"$(srcdir)/make-declare.lsp\")"; \
@ -34,7 +37,7 @@ test:
echo "#+(or cmu ecl) (quit)") | $(LISP)
../h/ecl.h:
ln -sf $(top_srcdir)/h/*.h ../h
$(LN_S) $(top_srcdir)/h/*.h ../h
clean:
rm -f $(FILES) BENCHMARK

View file

@ -1,3 +1,4 @@
;; @configure_input@
;;
;; Configuration file for ECL
;;
@ -23,7 +24,7 @@ Returns, as a string, the location of the machine on which ECL runs."
(defun lisp-implementation-version ()
"Args:()
Returns the version of your ECL as a string."
"@ECL_VERSION@")
"@PACKAGE_VERSION@")
(defun machine-type ()
"Args: ()
@ -41,7 +42,7 @@ from uname(2) where available."
"Args: ()
Returns, as a string, the version of the machine on which ECL runs. Obtained from
uname(2) where available."
"@MACHINE@")
"@MACHINE_VERSION@")
(push :@thehost@ *features*)

View file

@ -1,3 +1,5 @@
;;; @configure_input@
(if (not (member "CROSS" *features* :test #'string-equal))
(progn
(load "src:lsp;export.lsp" :verbose nil)
@ -44,4 +46,4 @@
))
#-cross
(mapc #'(lambda (x) (load x :verbose nil)) (cddddr +lisp-module-files+))
(mapc #'(lambda (x) (load x :verbose nil)) (cddddr +lisp-module-files+))

View file

@ -9,7 +9,7 @@ MACHINE = @host@
#
CC = @CC@
DEFS = -D$(MACHINE)
CFLAGS = -c @CFLAGS@ $(DEFS)
CFLAGS = -c @CPPFLAGS@ @CFLAGS@ $(DEFS)
OFLAG = @OFLAG@
SHELL = /bin/sh

View file

@ -4,7 +4,7 @@ top_srcdir= @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
MACHINE = @MACHINE@
MACHINE = @MACHINE_VERSION@
# Programs used by "make":
#

View file

@ -1,9 +1,10 @@
#!/bin/sh
# @configure_input@
usage()
{
cat <<EOF
Usage: eclconfig [OPTIONS] [LIBS]
Usage: $0 [OPTIONS] [LIBS]
Options:
[--cflags]
[--libs|--ldflags]
@ -35,5 +36,5 @@ if test "$echo_cflags" = "yes"; then
fi
if test "$echo_ldflags" = "yes"; then
echo "@LDRPATH@ -L@libdir\@ $LDFLAGS @LDFLAGS@ @CLIBS@"
echo "@LDRPATH@ -L@libdir\@ $LDFLAGS @LDFLAGS@ @LIBS@"
fi