Reorder the configuration file to add 'atomic' to the list of configured directories

This commit is contained in:
Juan Jose Garcia Ripoll 2010-10-30 21:35:33 +02:00
parent 3e6afeb2a1
commit 62d2129da0
5 changed files with 270 additions and 259 deletions

View file

@ -117,7 +117,8 @@ bin/ecl-config: bin/ecl-config.pre
fi
@LIBPREFIX@eclatomic.@LIBEXT@:
if (echo $(SUBDIRS) | grep atomic); then \
cd atomic && $(MAKE) && $(MAKE) install && cd .. && rm -rf share && \
cd atomic && $(MAKE) && $(MAKE) install && cd .. && \
rm -rf share ecl/atomic_ops_stack.h ecl/atomic_ops_malloc.h *atomic*gpl* && \
mv @LIBPREFIX@atomic_ops.@LIBEXT@ @LIBPREFIX@eclatomic.@LIBEXT@; \
fi
@LIBPREFIX@eclgmp.@LIBEXT@:

36
src/aclocal.m4 vendored
View file

@ -893,3 +893,39 @@ if test "x$ecl_threads" != "xno"; then
fi
fi
])
dnl ----------------------------------------------------------------------
dnl Configure included Boehm GC if needed
AC_DEFUN([ECL_BOEHM_GC],[
AC_SUBST(ECL_BOEHM_GC_HEADER)
case "${enable_boehm}" in
included)
AC_MSG_NOTICE([Configuring included Boehm GC library:])
test -d gc && rm -rf gc
if mkdir gc; then
(destdir=`${PWDCMD}`; cd gc; \
$srcdir/gc/configure --disable-shared --prefix=${destdir} \
--includedir=${destdir}/ecl/ --libdir=${destdir} --build=${build_alias} \
--host=${host_alias} --enable-large-config \
CC="${CC} ${PICFLAG}" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS" \
${boehm_configure_flags})
ECL_BOEHM_GC_HEADER='ecl/gc/gc.h'
else
AC_MSG_ERROR([Unable to create 'gc' directory])
fi
;;
system)
AC_CHECK_HEADER([gc.h],[ECL_BOEHM_GC_HEADER='gc.h'],[],[])
if test -z "$ECL_BOEHM_GC_HEADER"; then
AC_CHECK_HEADER([gc/gc.h],[ECL_BOEHM_GC_HEADER='gc/gc.h'],[],[])
fi
if test -z "$ECL_BOEHM_GC_HEADER"; then
AC_MSG_ERROR([Boehm-Weiser garbage collector's headers not found])
fi
;;
no)
ECL_BOEHM_GC_HEADER='none';;
*)
AC_MSG_ERROR([Not a valid argument for --enable-boehm $enable_boehm]);;
esac
])

445
src/configure vendored
View file

@ -637,8 +637,8 @@ ac_includes_default="\
#endif"
ac_subst_vars='LTLIBOBJS
ECL_BOEHM_GC_HEADER
CLX_INFO
ECL_BOEHM_GC_HEADER
ECL_CC
POW_LIB
LIBOBJS
@ -14705,218 +14705,23 @@ _ACEOF
fi
if test ${enable_shared} = "yes"; then
cat >>confdefs.h <<\_ACEOF
#define ENABLE_DLOPEN 1
_ACEOF
LSP_LIBRARIES="${SHAREDPREFIX}ecl.${SHAREDEXT}"
LSP_FEATURES="(cons :wants-dlopen ${LSP_FEATURES})"
else
enable_soname=no
LSP_LIBRARIES="${LIBPREFIX}ecl.${LIBEXT}"
ECL_LDRPATH=''
fi
if test "x${enable_rpath}" = "xno"; then
ECL_LDRPATH=''
fi
if test "${with_cmuformat}" = "yes"; then
with_clos_streams="yes"
cat >>confdefs.h <<\_ACEOF
#define ECL_CMU_FORMAT 1
_ACEOF
fi
if test "${with_clos_streams}" = "yes"; then
cat >>confdefs.h <<\_ACEOF
#define ECL_CLOS_STREAMS 1
_ACEOF
fi
if test "${with_cmp}" = "builtin"; then
LSP_FEATURES="(cons :builtin-cmp ${LSP_FEATURES})"
with_cmp=yes
fi
if test "${with_cmp}" = "yes"; then
LSP_FEATURES="(cons :wants-cmp ${LSP_FEATURES})"
fi
if test "${with_clx}" = "builtin"; then
LSP_FEATURES="(cons :builtin-clx ${LSP_FEATURES})"
LSP_FEATURES="(cons :builtin-sockets ${LSP_FEATURES})"
with_clx=yes
fi
if test ${with_clx} = "yes"; then
tcp="yes"
LSP_FEATURES="(cons :wants-clx ${LSP_FEATURES})"
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}"
LSP_FEATURES="(cons :wants-sockets ${LSP_FEATURES})"
LIBS="${LIBS} ${TCPLIBS}"
fi
if test "${with_serve_event}" = "builtin"; then
LSP_FEATURES="(cons :builtin-serve_event ${LSP_FEATURES})"
with_serve_event=yes
fi
if test "${with_serve_event}" = "yes"; then
case "${host_os}" in
mingw*|cygwin*) ;;
*)
LSP_FEATURES="(cons :wants-serve-event ${LSP_FEATURES})"
;;
esac
fi
if test "${with_asdf}" = "builtin"; then
LSP_FEATURES="(cons :builtin-asdf ${LSP_FEATURES})"
with_asdf=yes
fi
if test "${with_asdf}" = "yes"; then
LSP_FEATURES="(cons :wants-asdf ${LSP_FEATURES})"
fi
if test "${with_defsystem}" = "builtin"; then
LSP_FEATURES="(cons :builtin-defsystem ${LSP_FEATURES})"
with_defsystem=yes
fi
if test "${with_defsystem}" = "yes"; then
LSP_FEATURES="(cons :wants-defsystem ${LSP_FEATURES})"
fi
if test "${with_profile}" = "builtin"; then
LSP_FEATURES="(cons :builtin-profile ${LSP_FEATURES})"
with_profile=yes
fi
if test "${with_profile}" = "yes"; then
if test "${enable_boehm}" != "no"; then
LSP_FEATURES="(cons :wants-profile ${LSP_FEATURES})"
if test "x$ecl_threads" != "xno"; then
if mkdir atomic; then
(destdir=`${PWDCMD}`; cd atomic; CC="${CC} ${PICFLAG}" \
$srcdir/gc/libatomic*/configure --disable-shared --prefix=${destdir} \
--infodir=${destdir}/doc --includedir=${destdir}/ecl --with-pic \
--libdir=${destdir} --build=${build_alias} --host=${host_alias} \
CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS" CC="${CC} \
${PICFLAG}")
SUBDIRS="${SUBDIRS} atomic"
CORE_LIBS="-leclatomic ${CORE_LIBS}"
if test "${enable_shared}" = "no"; then
LIBRARIES="${LIBRARIES} ${LIBPREFIX}eclatomic.${LIBEXT}"
fi
fi
fi
if test "${with_bytecmp}" = "builtin"; then
LSP_FEATURES="(cons :builtin-bytecmp ${LSP_FEATURES})"
with_bytecmp=yes
fi
if test "${with_bytecmp}" = "yes"; then
LSP_FEATURES="(cons :wants-bytecmp ${LSP_FEATURES})"
fi
if test "${with_rt}" = "builtin"; then
LSP_FEATURES="(cons :builtin-rt ${LSP_FEATURES})"
with_rt=yes
fi
if test "${with_rt}" = "yes"; then
LSP_FEATURES="(cons :wants-rt ${LSP_FEATURES})"
fi
if test "${enable_unicode}" = "yes"; then
cat >>confdefs.h <<\_ACEOF
#define ECL_UNICODE 1
_ACEOF
fi
if test "${enable_hpack}" = "yes"; then
cat >>confdefs.h <<\_ACEOF
#define ECL_RELATIVE_PACKAGE_NAMES 1
_ACEOF
fi
case "${enable_boehm}" in
@ -15220,22 +15025,218 @@ $as_echo "$as_me: error: Not a valid argument for --enable-boehm $enable_boehm"
esac
if test "x$ecl_threads" != "xno"; then
if mkdir atomic; then
(destdir=`${PWDCMD}`; cd atomic; CC="${CC} ${PICFLAG}" \
$srcdir/gc/libatomic*/configure --disable-shared --prefix=${destdir} \
--infodir=${destdir}/doc --includedir=${destdir}/ecl --with-pic \
--libdir=${destdir} --build=${build_alias} --host=${host_alias} \
CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS" CC="${CC} \
${PICFLAG}")
SUBDIRS="${SUBDIRS} atomic"
CORE_LIBS="-leclatomic ${CORE_LIBS}"
if test "${enable_shared}" = "no"; then
LIBRARIES="${LIBRARIES} ${LIBPREFIX}eclatomic.${LIBEXT}"
fi
if test ${enable_shared} = "yes"; then
cat >>confdefs.h <<\_ACEOF
#define ENABLE_DLOPEN 1
_ACEOF
LSP_LIBRARIES="${SHAREDPREFIX}ecl.${SHAREDEXT}"
LSP_FEATURES="(cons :wants-dlopen ${LSP_FEATURES})"
else
enable_soname=no
LSP_LIBRARIES="${LIBPREFIX}ecl.${LIBEXT}"
ECL_LDRPATH=''
fi
if test "x${enable_rpath}" = "xno"; then
ECL_LDRPATH=''
fi
if test "${with_cmuformat}" = "yes"; then
with_clos_streams="yes"
cat >>confdefs.h <<\_ACEOF
#define ECL_CMU_FORMAT 1
_ACEOF
fi
if test "${with_clos_streams}" = "yes"; then
cat >>confdefs.h <<\_ACEOF
#define ECL_CLOS_STREAMS 1
_ACEOF
fi
if test "${with_cmp}" = "builtin"; then
LSP_FEATURES="(cons :builtin-cmp ${LSP_FEATURES})"
with_cmp=yes
fi
if test "${with_cmp}" = "yes"; then
LSP_FEATURES="(cons :wants-cmp ${LSP_FEATURES})"
fi
if test "${with_clx}" = "builtin"; then
LSP_FEATURES="(cons :builtin-clx ${LSP_FEATURES})"
LSP_FEATURES="(cons :builtin-sockets ${LSP_FEATURES})"
with_clx=yes
fi
if test ${with_clx} = "yes"; then
tcp="yes"
LSP_FEATURES="(cons :wants-clx ${LSP_FEATURES})"
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}"
LSP_FEATURES="(cons :wants-sockets ${LSP_FEATURES})"
LIBS="${LIBS} ${TCPLIBS}"
fi
if test "${with_serve_event}" = "builtin"; then
LSP_FEATURES="(cons :builtin-serve_event ${LSP_FEATURES})"
with_serve_event=yes
fi
if test "${with_serve_event}" = "yes"; then
case "${host_os}" in
mingw*|cygwin*) ;;
*)
LSP_FEATURES="(cons :wants-serve-event ${LSP_FEATURES})"
;;
esac
fi
if test "${with_asdf}" = "builtin"; then
LSP_FEATURES="(cons :builtin-asdf ${LSP_FEATURES})"
with_asdf=yes
fi
if test "${with_asdf}" = "yes"; then
LSP_FEATURES="(cons :wants-asdf ${LSP_FEATURES})"
fi
if test "${with_defsystem}" = "builtin"; then
LSP_FEATURES="(cons :builtin-defsystem ${LSP_FEATURES})"
with_defsystem=yes
fi
if test "${with_defsystem}" = "yes"; then
LSP_FEATURES="(cons :wants-defsystem ${LSP_FEATURES})"
fi
if test "${with_profile}" = "builtin"; then
LSP_FEATURES="(cons :builtin-profile ${LSP_FEATURES})"
with_profile=yes
fi
if test "${with_profile}" = "yes"; then
if test "${enable_boehm}" != "no"; then
LSP_FEATURES="(cons :wants-profile ${LSP_FEATURES})"
fi
fi
if test "${with_bytecmp}" = "builtin"; then
LSP_FEATURES="(cons :builtin-bytecmp ${LSP_FEATURES})"
with_bytecmp=yes
fi
if test "${with_bytecmp}" = "yes"; then
LSP_FEATURES="(cons :wants-bytecmp ${LSP_FEATURES})"
fi
if test "${with_rt}" = "builtin"; then
LSP_FEATURES="(cons :builtin-rt ${LSP_FEATURES})"
with_rt=yes
fi
if test "${with_rt}" = "yes"; then
LSP_FEATURES="(cons :wants-rt ${LSP_FEATURES})"
fi
if test "${enable_unicode}" = "yes"; then
cat >>confdefs.h <<\_ACEOF
#define ECL_UNICODE 1
_ACEOF
fi
if test "${enable_hpack}" = "yes"; then
cat >>confdefs.h <<\_ACEOF
#define ECL_RELATIVE_PACKAGE_NAMES 1
_ACEOF
fi
ac_config_files="$ac_config_files bare.lsp lsp/load.lsp clos/load.lsp cmp/load.lsp new-cmp/load.lsp ../Makefile Makefile c/Makefile doc/Makefile doc/ecl.man doc/ecl-config.man ecl/configpre.h:h/config.h.in bin/ecl-config.pre:util/ecl-config lsp/config.pre:lsp/config.lsp.in compile.pre:compile.lsp.in cmp/cmpdefs.pre:cmp/cmpdefs.lsp"

View file

@ -740,6 +740,9 @@ if test ! ${opcode8} = "no" ; then
[Bytecodes and arguments are 8 and 16 bits large, respectively])
fi
ECL_LIBATOMIC_OPS
ECL_BOEHM_GC
dnl ----------------------------------------------------------------------
dnl Lisp library and libecl features
if test ${enable_shared} = "yes"; then
@ -858,42 +861,6 @@ if test "${enable_hpack}" = "yes"; then
AC_DEFINE(ECL_RELATIVE_PACKAGE_NAMES, [1], [Hierarchical package names])
fi
dnl ----------------------------------------------------------------------
dnl Configure included Boehm GC if needed
AC_SUBST(ECL_BOEHM_GC_HEADER)
case "${enable_boehm}" in
included)
AC_MSG_NOTICE([Configuring included Boehm GC library:])
test -d gc && rm -rf gc
if mkdir gc; then
(destdir=`${PWDCMD}`; cd gc; \
$srcdir/gc/configure --disable-shared --prefix=${destdir} \
--includedir=${destdir}/ecl/ --libdir=${destdir} --build=${build_alias} \
--host=${host_alias} --enable-large-config \
CC="${CC} ${PICFLAG}" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS" \
${boehm_configure_flags})
ECL_BOEHM_GC_HEADER='ecl/gc/gc.h'
else
AC_MSG_ERROR([Unable to create 'gc' directory])
fi
;;
system)
AC_CHECK_HEADER([gc.h],[ECL_BOEHM_GC_HEADER='gc.h'],[],[])
if test -z "$ECL_BOEHM_GC_HEADER"; then
AC_CHECK_HEADER([gc/gc.h],[ECL_BOEHM_GC_HEADER='gc/gc.h'],[],[])
fi
if test -z "$ECL_BOEHM_GC_HEADER"; then
AC_MSG_ERROR([Boehm-Weiser garbage collector's headers not found])
fi
;;
no)
ECL_BOEHM_GC_HEADER='none';;
*)
AC_MSG_ERROR([Not a valid argument for --enable-boehm $enable_boehm]);;
esac
ECL_LIBATOMIC_OPS
AC_CONFIG_FILES([
bare.lsp lsp/load.lsp clos/load.lsp cmp/load.lsp new-cmp/load.lsp
../Makefile Makefile c/Makefile doc/Makefile doc/ecl.man doc/ecl-config.man

View file

@ -371,6 +371,12 @@ extern void cl_write_object(cl_object x, cl_object stream);
# define ECL_WITH_LOCK_END
#endif /* ECL_THREADS */
#ifdef ECL_THREADS
# include <ecl/atomic_ops.h>
#else
# define AO_load(x) (x)
# define AO_store(x,y) ((x)=(y))
#endif
/* read.d */
#ifdef ECL_UNICODE