mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 20:00:19 +02:00
Move most of the guts of shell command processing into libguile,
so guile.c can be very small (and eventuallly auto-generated. (I mean, generated mechanically, not self-generated. Hmm.)) * guile.c, script.c, script.h: New source files. * init.c (scm_boot_guile_1): Call scm_init_script. * libguile.h: #include "script.h". * Makefile.am (bin_PROGRAMS, guile_SOURCES, guile_LDADD): New targets, for new executable. (libguile_la_SOURCES): Mention script.c. (modinclude_HEADERS): Add script.h. * configure.in: Always check for -lm, -lsocket, -lnsl, whether or not dynamic linking is enabled. This is because we're generating executables now. Move CY_AC_WITH_THREADS call after those, so the values of cy_cv_threads_libs captures the libs chosen above. * Makefile.in, configure, aclocal.m4: Regenerated.
This commit is contained in:
parent
5ac58d89ab
commit
0487b82f9f
7 changed files with 554 additions and 778 deletions
|
@ -67,6 +67,10 @@ AUTOMAKE_OPTIONS = foreign
|
|||
INCLUDES = -I.. -I$(srcdir)/..
|
||||
|
||||
lib_LTLIBRARIES = libguile.la
|
||||
bin_PROGRAMS = guile
|
||||
|
||||
guile_SOURCES = guile.c
|
||||
guile_LDADD = libguile.la ${THREAD_LIBS}
|
||||
|
||||
libguile_la_SOURCES = \
|
||||
alist.c append.c appinit.c arbiters.c async.c boolean.c chars.c \
|
||||
|
@ -76,13 +80,14 @@ libguile_la_SOURCES = \
|
|||
hashtab.c init.c ioext.c kw.c list.c load.c mallocs.c markers.c \
|
||||
mbstrings.c net_db.c numbers.c objprop.c options.c pairs.c ports.c \
|
||||
posix.c print.c procprop.c procs.c ramap.c read.c root.c scmsigs.c \
|
||||
sequences.c simpos.c smob.c socket.c stackchk.c stime.c strings.c \
|
||||
strop.c strorder.c strports.c struct.c symbols.c tag.c throw.c unif.c \
|
||||
variable.c vectors.c version.c vports.c weaks.c
|
||||
script.c sequences.c simpos.c smob.c socket.c stackchk.c stime.c \
|
||||
strings.c strop.c strorder.c strports.c struct.c symbols.c tag.c \
|
||||
throw.c unif.c variable.c vectors.c version.c vports.c weaks.c
|
||||
|
||||
EXTRA_libguile_la_SOURCES = _scm.h \
|
||||
backtrace.c stacks.c debug.c srcprop.c \
|
||||
strerror.c inet_aton.c putenv.c \
|
||||
threads.c
|
||||
threads.c alloca.c
|
||||
|
||||
noinst_HEADERS = coop-threads.c coop-threads.h coop.c
|
||||
|
||||
|
@ -103,7 +108,7 @@ modinclude_HEADERS = __scm.h alist.h append.h arbiters.h async.h \
|
|||
gdb_interface.h gdbint.h genio.h gsubr.h hash.h hashtab.h init.h \
|
||||
ioext.h kw.h list.h load.h mallocs.h markers.h mbstrings.h net_db.h \
|
||||
numbers.h objprop.h options.h pairs.h ports.h posix.h print.h \
|
||||
procprop.h procs.h ramap.h read.h root.h scmhob.h scmsigs.h \
|
||||
procprop.h procs.h ramap.h read.h root.h scmhob.h scmsigs.h script.h \
|
||||
sequences.h simpos.h smob.h socket.h srcprop.h stackchk.h stacks.h \
|
||||
stime.h strings.h strop.h strorder.h strports.h struct.h symbols.h \
|
||||
tag.h tags.h throw.h unif.h variable.h vectors.h version.h vports.h \
|
||||
|
@ -121,7 +126,7 @@ gh_test_c_LDADD = ${check_ldadd}
|
|||
gh_test_repl_SOURCES = gh_test_repl.c
|
||||
gh_test_repl_LDADD = ${check_ldadd}
|
||||
|
||||
EXTRA_DIST = gscm.c gscm.h ChangeLog-scm dynl-dl.c dynl-dld.c dynl-shl.c \
|
||||
EXTRA_DIST = ChangeLog-scm dynl-dl.c dynl-dld.c dynl-shl.c \
|
||||
dynl-vms.c DYNAMIC-LINKING PLUGIN/REQ PLUGIN/guile.config \
|
||||
PLUGIN/guile.libs.in cpp_signal.c cpp_errno.c cpp_err_symbols.in \
|
||||
cpp_sig_symbols.in cpp_cnvt.awk \
|
||||
|
@ -155,10 +160,15 @@ gh_io.lo gh_list.lo gh_predicates.lo gsubr.lo hash.lo hashtab.lo \
|
|||
init.lo ioext.lo kw.lo list.lo load.lo mallocs.lo markers.lo \
|
||||
mbstrings.lo net_db.lo numbers.lo objprop.lo options.lo pairs.lo \
|
||||
ports.lo posix.lo print.lo procprop.lo procs.lo ramap.lo read.lo \
|
||||
root.lo scmsigs.lo sequences.lo simpos.lo smob.lo socket.lo stackchk.lo \
|
||||
stime.lo strings.lo strop.lo strorder.lo strports.lo struct.lo \
|
||||
symbols.lo tag.lo throw.lo unif.lo variable.lo vectors.lo version.lo \
|
||||
vports.lo weaks.lo
|
||||
root.lo scmsigs.lo script.lo sequences.lo simpos.lo smob.lo socket.lo \
|
||||
stackchk.lo stime.lo strings.lo strop.lo strorder.lo strports.lo \
|
||||
struct.lo symbols.lo tag.lo throw.lo unif.lo variable.lo vectors.lo \
|
||||
version.lo vports.lo weaks.lo
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
|
||||
guile_OBJECTS = guile.o
|
||||
guile_DEPENDENCIES = libguile.la
|
||||
guile_LDFLAGS =
|
||||
gh_test_c_OBJECTS = gh_test_c.o
|
||||
gh_test_c_DEPENDENCIES = libguile.la
|
||||
gh_test_c_LDFLAGS =
|
||||
|
@ -185,7 +195,7 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
|||
|
||||
TAR = tar
|
||||
GZIP = --best
|
||||
DEP_FILES = .deps/alist.P .deps/append.P .deps/appinit.P \
|
||||
DEP_FILES = .deps/alist.P .deps/alloca.P .deps/append.P .deps/appinit.P \
|
||||
.deps/arbiters.P .deps/async.P .deps/backtrace.P .deps/boolean.P \
|
||||
.deps/chars.P .deps/continuations.P .deps/debug.P .deps/dynl.P \
|
||||
.deps/dynwind.P .deps/eq.P .deps/error.P .deps/eval.P .deps/extchrs.P \
|
||||
|
@ -193,20 +203,21 @@ DEP_FILES = .deps/alist.P .deps/append.P .deps/appinit.P \
|
|||
.deps/gdbint.P .deps/genio.P .deps/gh_data.P .deps/gh_eval.P \
|
||||
.deps/gh_funcs.P .deps/gh_init.P .deps/gh_io.P .deps/gh_list.P \
|
||||
.deps/gh_predicates.P .deps/gh_test_c.P .deps/gh_test_repl.P \
|
||||
.deps/gsubr.P .deps/hash.P .deps/hashtab.P .deps/inet_aton.P \
|
||||
.deps/init.P .deps/ioext.P .deps/kw.P .deps/list.P .deps/load.P \
|
||||
.deps/mallocs.P .deps/markers.P .deps/mbstrings.P .deps/net_db.P \
|
||||
.deps/numbers.P .deps/objprop.P .deps/options.P .deps/pairs.P \
|
||||
.deps/ports.P .deps/posix.P .deps/print.P .deps/procprop.P \
|
||||
.deps/procs.P .deps/putenv.P .deps/ramap.P .deps/read.P .deps/root.P \
|
||||
.deps/scmsigs.P .deps/sequences.P .deps/simpos.P .deps/smob.P \
|
||||
.deps/socket.P .deps/srcprop.P .deps/stackchk.P .deps/stacks.P \
|
||||
.deps/stime.P .deps/strerror.P .deps/strings.P .deps/strop.P \
|
||||
.deps/strorder.P .deps/strports.P .deps/struct.P .deps/symbols.P \
|
||||
.deps/tag.P .deps/threads.P .deps/throw.P .deps/unif.P .deps/variable.P \
|
||||
.deps/gsubr.P .deps/guile.P .deps/hash.P .deps/hashtab.P \
|
||||
.deps/inet_aton.P .deps/init.P .deps/ioext.P .deps/kw.P .deps/list.P \
|
||||
.deps/load.P .deps/mallocs.P .deps/markers.P .deps/mbstrings.P \
|
||||
.deps/net_db.P .deps/numbers.P .deps/objprop.P .deps/options.P \
|
||||
.deps/pairs.P .deps/ports.P .deps/posix.P .deps/print.P \
|
||||
.deps/procprop.P .deps/procs.P .deps/putenv.P .deps/ramap.P \
|
||||
.deps/read.P .deps/root.P .deps/scmsigs.P .deps/script.P \
|
||||
.deps/sequences.P .deps/simpos.P .deps/smob.P .deps/socket.P \
|
||||
.deps/srcprop.P .deps/stackchk.P .deps/stacks.P .deps/stime.P \
|
||||
.deps/strerror.P .deps/strings.P .deps/strop.P .deps/strorder.P \
|
||||
.deps/strports.P .deps/struct.P .deps/symbols.P .deps/tag.P \
|
||||
.deps/threads.P .deps/throw.P .deps/unif.P .deps/variable.P \
|
||||
.deps/vectors.P .deps/version.P .deps/vports.P .deps/weaks.P
|
||||
SOURCES = $(libguile_la_SOURCES) $(EXTRA_libguile_la_SOURCES) $(gh_test_c_SOURCES) $(gh_test_repl_SOURCES)
|
||||
OBJECTS = $(libguile_la_OBJECTS) $(gh_test_c_OBJECTS) $(gh_test_repl_OBJECTS)
|
||||
SOURCES = $(libguile_la_SOURCES) $(EXTRA_libguile_la_SOURCES) $(guile_SOURCES) $(gh_test_c_SOURCES) $(gh_test_repl_SOURCES)
|
||||
OBJECTS = $(libguile_la_OBJECTS) $(guile_OBJECTS) $(gh_test_c_OBJECTS) $(gh_test_repl_OBJECTS)
|
||||
|
||||
default: all
|
||||
|
||||
|
@ -303,6 +314,31 @@ maintainer-clean-libtool:
|
|||
libguile.la: $(libguile_la_OBJECTS) $(libguile_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(libguile_la_LDFLAGS) $(libguile_la_OBJECTS) $(libguile_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-binPROGRAMS:
|
||||
|
||||
clean-binPROGRAMS:
|
||||
test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
|
||||
|
||||
distclean-binPROGRAMS:
|
||||
|
||||
maintainer-clean-binPROGRAMS:
|
||||
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(bindir)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
$(NORMAL_UNINSTALL)
|
||||
list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \
|
||||
done
|
||||
|
||||
mostlyclean-checkPROGRAMS:
|
||||
|
||||
clean-checkPROGRAMS:
|
||||
|
@ -312,6 +348,10 @@ distclean-checkPROGRAMS:
|
|||
|
||||
maintainer-clean-checkPROGRAMS:
|
||||
|
||||
guile: $(guile_OBJECTS) $(guile_DEPENDENCIES)
|
||||
@rm -f guile
|
||||
$(LINK) $(guile_LDFLAGS) $(guile_OBJECTS) $(guile_LDADD) $(LIBS)
|
||||
|
||||
gh_test_c: $(gh_test_c_OBJECTS) $(gh_test_c_DEPENDENCIES)
|
||||
@rm -f gh_test_c
|
||||
$(LINK) $(gh_test_c_LDFLAGS) $(gh_test_c_OBJECTS) $(gh_test_c_LDADD) $(LIBS)
|
||||
|
@ -493,7 +533,7 @@ dvi:
|
|||
check: all $(check_PROGRAMS)
|
||||
$(MAKE)
|
||||
installcheck:
|
||||
install-exec: install-libLTLIBRARIES install-binSCRIPTS
|
||||
install-exec: install-libLTLIBRARIES install-binPROGRAMS install-binSCRIPTS
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install-data: install-modincludeDATA install-includeHEADERS install-modincludeHEADERS install-pkgincludeHEADERS
|
||||
|
@ -502,15 +542,15 @@ install-data: install-modincludeDATA install-includeHEADERS install-modincludeHE
|
|||
install: install-exec install-data all
|
||||
@:
|
||||
|
||||
uninstall: uninstall-libLTLIBRARIES uninstall-binSCRIPTS uninstall-modincludeDATA uninstall-includeHEADERS uninstall-modincludeHEADERS uninstall-pkgincludeHEADERS
|
||||
uninstall: uninstall-libLTLIBRARIES uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-modincludeDATA uninstall-includeHEADERS uninstall-modincludeHEADERS uninstall-pkgincludeHEADERS
|
||||
|
||||
all: $(LTLIBRARIES) $(SCRIPTS) $(DATA) $(HEADERS) Makefile scmconfig.h
|
||||
all: $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) $(HEADERS) Makefile scmconfig.h
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(libdir) $(bindir) $(modincludedir) $(includedir) \
|
||||
$(modincludedir) $(pkgincludedir)
|
||||
$(mkinstalldirs) $(libdir) $(bindir) $(bindir) $(modincludedir) \
|
||||
$(includedir) $(modincludedir) $(pkgincludedir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
@ -529,21 +569,23 @@ maintainer-clean-generic:
|
|||
test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-hdr mostlyclean-libLTLIBRARIES \
|
||||
mostlyclean-compile mostlyclean-libtool \
|
||||
mostlyclean-checkPROGRAMS mostlyclean-tags \
|
||||
mostlyclean-depend mostlyclean-generic
|
||||
mostlyclean-binPROGRAMS mostlyclean-checkPROGRAMS \
|
||||
mostlyclean-tags mostlyclean-depend mostlyclean-generic
|
||||
|
||||
clean: clean-hdr clean-libLTLIBRARIES clean-compile clean-libtool \
|
||||
clean-checkPROGRAMS clean-tags clean-depend \
|
||||
clean-generic mostlyclean
|
||||
clean-binPROGRAMS clean-checkPROGRAMS clean-tags \
|
||||
clean-depend clean-generic mostlyclean
|
||||
|
||||
distclean: distclean-hdr distclean-libLTLIBRARIES distclean-compile \
|
||||
distclean-libtool distclean-checkPROGRAMS \
|
||||
distclean-tags distclean-depend distclean-generic clean
|
||||
distclean-libtool distclean-binPROGRAMS \
|
||||
distclean-checkPROGRAMS distclean-tags distclean-depend \
|
||||
distclean-generic clean
|
||||
rm -f config.status
|
||||
rm -f libtool
|
||||
|
||||
maintainer-clean: maintainer-clean-hdr maintainer-clean-libLTLIBRARIES \
|
||||
maintainer-clean-compile maintainer-clean-libtool \
|
||||
maintainer-clean-binPROGRAMS \
|
||||
maintainer-clean-checkPROGRAMS maintainer-clean-tags \
|
||||
maintainer-clean-depend maintainer-clean-generic \
|
||||
distclean
|
||||
|
@ -558,6 +600,8 @@ maintainer-clean-libLTLIBRARIES uninstall-libLTLIBRARIES \
|
|||
install-libLTLIBRARIES mostlyclean-compile distclean-compile \
|
||||
clean-compile maintainer-clean-compile mostlyclean-libtool \
|
||||
distclean-libtool clean-libtool maintainer-clean-libtool \
|
||||
mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
|
||||
maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
|
||||
mostlyclean-checkPROGRAMS distclean-checkPROGRAMS clean-checkPROGRAMS \
|
||||
maintainer-clean-checkPROGRAMS uninstall-binSCRIPTS install-binSCRIPTS \
|
||||
uninstall-modincludeDATA install-modincludeDATA \
|
||||
|
|
340
libguile/aclocal.m4
vendored
340
libguile/aclocal.m4
vendored
|
@ -1,340 +0,0 @@
|
|||
dnl aclocal.m4 generated automatically by aclocal 1.1n
|
||||
|
||||
dnl On the NeXT, #including <utime.h> doesn't give you a definition for
|
||||
dnl struct utime, unless you #define _POSIX_SOURCE.
|
||||
|
||||
AC_DEFUN(GUILE_STRUCT_UTIMBUF, [
|
||||
AC_CACHE_CHECK([whether we need POSIX to get struct utimbuf],
|
||||
guile_cv_struct_utimbuf_needs_posix,
|
||||
[AC_TRY_CPP([
|
||||
#ifdef __EMX__
|
||||
#include <sys/utime.h>
|
||||
#else
|
||||
#include <utime.h>
|
||||
#endif
|
||||
struct utime blah;
|
||||
],
|
||||
guile_cv_struct_utimbuf_needs_posix=no,
|
||||
guile_cv_struct_utimbuf_needs_posix=yes)])
|
||||
if test "$guile_cv_struct_utimbuf_needs_posix" = yes; then
|
||||
AC_DEFINE(UTIMBUF_NEEDS_POSIX)
|
||||
fi])
|
||||
|
||||
|
||||
|
||||
|
||||
dnl
|
||||
dnl Apparently, at CMU they have a weird version of libc.h that is
|
||||
dnl installed in /usr/local/include and conflicts with unistd.h.
|
||||
dnl In these situations, we should not #include libc.h.
|
||||
dnl This test arranges to #define LIBC_H_WITH_UNISTD_H iff libc.h is
|
||||
dnl present on the system, and is safe to #include.
|
||||
dnl
|
||||
AC_DEFUN([GUILE_HEADER_LIBC_WITH_UNISTD],
|
||||
[
|
||||
AC_CHECK_HEADERS(libc.h unistd.h)
|
||||
AC_CACHE_CHECK(
|
||||
"whether libc.h and unistd.h can be included together",
|
||||
guile_cv_header_libc_with_unistd,
|
||||
[
|
||||
if test "$ac_cv_header_libc_h" = "no"; then
|
||||
guile_cv_header_libc_with_unistd="no"
|
||||
elif test "$ac_cv_header_unistd.h" = "no"; then
|
||||
guile_cv_header_libc_with_unistd="yes"
|
||||
else
|
||||
AC_TRY_COMPILE(
|
||||
[
|
||||
# include <libc.h>
|
||||
# include <unistd.h>
|
||||
],
|
||||
[],
|
||||
[guile_cv_header_libc_with_unistd=yes],
|
||||
[guile_cv_header_libc_with_unistd=no]
|
||||
)
|
||||
fi
|
||||
]
|
||||
)
|
||||
if test "$guile_cv_header_libc_with_unistd" = yes; then
|
||||
AC_DEFINE(LIBC_H_WITH_UNISTD_H)
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
||||
# Like AC_CONFIG_HEADER, but automatically create stamp file.
|
||||
|
||||
AC_DEFUN(AM_CONFIG_HEADER,
|
||||
[AC_PREREQ([2.12])
|
||||
AC_CONFIG_HEADER([$1])
|
||||
dnl When config.status generates a header, we must update the stamp-h file.
|
||||
dnl This file resides in the same directory as the config header
|
||||
dnl that is generated. We must strip everything past the first ":",
|
||||
dnl and everything past the last "/".
|
||||
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
|
||||
test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl
|
||||
changequote([,]))])
|
||||
|
||||
|
||||
dnl Usage: AM_INIT_GUILE_MODULE(module-name)
|
||||
dnl This macro will automatically get the guile version from the
|
||||
dnl top-level srcdir, and will initialize automake. It also
|
||||
dnl defines the `module' variable.
|
||||
AC_DEFUN([AM_INIT_GUILE_MODULE],[
|
||||
. $srcdir/../GUILE-VERSION
|
||||
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
|
||||
AC_CONFIG_AUX_DIR(..)
|
||||
module=[$1]
|
||||
AC_SUBST(module)])
|
||||
|
||||
# Do all the work for Automake. This macro actually does too much --
|
||||
# some checks are only needed if your package does certain things.
|
||||
# But this isn't really a big deal.
|
||||
|
||||
# serial 1
|
||||
|
||||
dnl Usage:
|
||||
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
||||
|
||||
AC_DEFUN(AM_INIT_AUTOMAKE,
|
||||
[AC_REQUIRE([AM_PROG_INSTALL])
|
||||
PACKAGE=[$1]
|
||||
AC_SUBST(PACKAGE)
|
||||
VERSION=[$2]
|
||||
AC_SUBST(VERSION)
|
||||
ifelse([$3],,
|
||||
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
|
||||
AM_SANITY_CHECK
|
||||
AC_ARG_PROGRAM
|
||||
dnl FIXME This is truly gross.
|
||||
missing_dir=`cd $ac_aux_dir && pwd`
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
|
||||
AC_PROG_MAKE_SET])
|
||||
|
||||
|
||||
# serial 1
|
||||
|
||||
AC_DEFUN(AM_PROG_INSTALL,
|
||||
[AC_REQUIRE([AC_PROG_INSTALL])
|
||||
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
|
||||
AC_SUBST(INSTALL_SCRIPT)dnl
|
||||
])
|
||||
|
||||
#
|
||||
# Check to make sure that the build environment is sane.
|
||||
#
|
||||
|
||||
AC_DEFUN(AM_SANITY_CHECK,
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftestfile
|
||||
# Do `set' in a subshell so we don't clobber the current shell's
|
||||
# arguments. Must try -L first in case configure is actually a
|
||||
# symlink; some systems play weird games with the mod time of symlinks
|
||||
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||
# directory).
|
||||
if (
|
||||
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
|
||||
if test "$@" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftestfile`
|
||||
fi
|
||||
test "[$]2" = conftestfile
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
rm -f conftest*
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
||||
dnl The program must properly implement --version.
|
||||
AC_DEFUN(AM_MISSING_PROG,
|
||||
[AC_MSG_CHECKING(for working $2)
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
if ($2 --version) > /dev/null 2>&1; then
|
||||
$1=$2
|
||||
AC_MSG_RESULT(found)
|
||||
else
|
||||
$1="$3/missing $2"
|
||||
AC_MSG_RESULT(missing)
|
||||
fi
|
||||
AC_SUBST($1)])
|
||||
|
||||
# Add --enable-maintainer-mode option to configure.
|
||||
# From Jim Meyering
|
||||
|
||||
# serial 1
|
||||
|
||||
AC_DEFUN(AM_MAINTAINER_MODE,
|
||||
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
||||
dnl maintainer-mode is disabled by default
|
||||
AC_ARG_ENABLE(maintainer-mode,
|
||||
[ --enable-maintainer-mode enable make rules and dependencies not useful
|
||||
(and sometimes confusing) to the casual installer],
|
||||
USE_MAINTAINER_MODE=$enableval,
|
||||
USE_MAINTAINER_MODE=no)
|
||||
AC_MSG_RESULT($USE_MAINTAINER_MODE)
|
||||
if test $USE_MAINTAINER_MODE = yes; then
|
||||
MAINT=
|
||||
else
|
||||
MAINT='#M#'
|
||||
fi
|
||||
AC_SUBST(MAINT)dnl
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
# serial 4 AM_PROG_LIBTOOL
|
||||
AC_DEFUN(AM_PROG_LIBTOOL,
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_PROG_RANLIB])
|
||||
|
||||
# Always use our own libtool.
|
||||
LIBTOOL='$(top_builddir)/libtool'
|
||||
AC_SUBST(LIBTOOL)
|
||||
|
||||
dnl Allow the --disable-shared flag to stop us from building shared libs.
|
||||
AC_ARG_ENABLE(shared,
|
||||
[ --enable-shared build shared libraries [default=yes]],
|
||||
test "$enableval" = no && libtool_shared=" --disable-shared",
|
||||
libtool_shared=)
|
||||
|
||||
libtool_flags="$libtool_shared"
|
||||
test "$silent" = yes && libtool_flags="$libtool_flags --silent"
|
||||
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
|
||||
|
||||
[case "$host" in
|
||||
*-*-irix6*)
|
||||
# For IRIX 6, ld needs -n32 if cc uses it.
|
||||
if echo " $CC $CFLAGS " | egrep -e '[ ]-n32[ ]' > /dev/null; then
|
||||
LD="${LD-ld} -n32"
|
||||
fi
|
||||
;;
|
||||
|
||||
*-*-sco3.2v5*)
|
||||
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
|
||||
CFLAGS="$CFLAGS -belf"
|
||||
;;
|
||||
esac]
|
||||
|
||||
# Actually configure libtool. ac_aux_dir is where install-sh is found.
|
||||
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" LD="$LD" RANLIB="$RANLIB" \
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
|
||||
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|
||||
|| AC_MSG_ERROR([libtool configure failed])
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl CY_AC_WITH_THREADS determines which thread library the user intends
|
||||
dnl to put underneath guile. Pass it the path to find the guile top-level
|
||||
dnl source directory. Eg CY_AC_WITH_THREADS(../..) for tcl/unix.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([CY_AC_WITH_THREADS],[
|
||||
AC_CACHE_CHECK("threads package type",cy_cv_threads_package,[
|
||||
AC_CACHE_VAL(cy_cv_threads_cflags,[
|
||||
AC_CACHE_VAL(cy_cv_threads_libs,[
|
||||
use_threads=no;
|
||||
AC_ARG_WITH(threads,[ --with-threads thread interface],
|
||||
use_threads=$withval, use_threads=no)
|
||||
test -n "$use_threads" || use_threads=qt
|
||||
threads_package=unknown
|
||||
if test "$use_threads" != no; then
|
||||
dnl
|
||||
dnl Test for the qt threads package - used for cooperative threads
|
||||
dnl This may not necessarily be built yet - so just check for the
|
||||
dnl header files.
|
||||
dnl
|
||||
if test "$use_threads" = yes || test "$use_threads" = qt; then
|
||||
# Look for qt in source directory. This is a hack: we look in
|
||||
# "./qt" because this check might be run at the top level.
|
||||
if test -f $srcdir/../qt/qt.c || test -f $srcdir/qt/qt.c; then
|
||||
threads_package=COOP
|
||||
cy_cv_threads_cflags="-I$srcdir/../qt -I../qt"
|
||||
cy_cv_threads_libs="../qt/libqt.a"
|
||||
fi
|
||||
else
|
||||
if test -f $use_threads/qt.c; then
|
||||
# FIXME seems as though we should try to use an installed qt here.
|
||||
threads_package=COOP
|
||||
cy_cv_threads_cflags="-I$use_threads -I../qt"
|
||||
cy_cv_threads_libs="../qt/libqt.a"
|
||||
fi
|
||||
fi
|
||||
if test "$use_threads" = pthreads; then
|
||||
# Look for pthreads in srcdir. See above to understand why
|
||||
# we always set threads_package.
|
||||
if test -f $srcdir/../../pthreads/pthreads/queue.c \
|
||||
|| test -f $srcdir/../pthreads/pthreads/queue.c; then
|
||||
threads_package=MIT
|
||||
cy_cv_threads_cflags="-I$srcdir/../../pthreads/include"
|
||||
cy_cv_threads_libs="-L../../pthreads/lib -lpthread"
|
||||
fi
|
||||
fi
|
||||
saved_CPP="$CPPFLAGS"
|
||||
saved_LD="$LDFLAGS"
|
||||
saved_LIBS="$LIBS"
|
||||
if test "$threads_package" = unknown; then
|
||||
dnl
|
||||
dnl Test for the FSU threads package
|
||||
dnl
|
||||
CPPFLAGS="-I$use_threads/include"
|
||||
LDFLAGS="-L$use_threads/lib"
|
||||
LIBS="-lgthreads -lmalloc"
|
||||
AC_TRY_LINK([#include <pthread.h>],[
|
||||
pthread_equal(NULL,NULL);
|
||||
], threads_package=FSU)
|
||||
fi
|
||||
if test "$threads_package" = unknown; then
|
||||
dnl
|
||||
dnl Test for the MIT threads package
|
||||
dnl
|
||||
LIBS="-lpthread"
|
||||
AC_TRY_LINK([#include <pthread.h>],[
|
||||
pthread_equal(NULL,NULL);
|
||||
], threads_package=MIT)
|
||||
fi
|
||||
if test "$threads_package" = unknown; then
|
||||
dnl
|
||||
dnl Test for the PCthreads package
|
||||
dnl
|
||||
LIBS="-lpthreads"
|
||||
AC_TRY_LINK([#include <pthread.h>],[
|
||||
pthread_equal(NULL,NULL);
|
||||
], threads_package=PCthreads)
|
||||
fi
|
||||
dnl
|
||||
dnl Set the appropriate flags!
|
||||
dnl
|
||||
cy_cv_threads_cflags="$CPPFLAGS $cy_cv_threads_cflags"
|
||||
cy_cv_threads_libs="$LDFLAGS $LIBS $cy_cv_threads_libs"
|
||||
cy_cv_threads_package=$threads_package
|
||||
CPPFLAGS="$saved_CPP"
|
||||
LDFLAGS="$saved_LD"
|
||||
LIBS="$saved_LIBS"
|
||||
if test "$threads_package" = unknown; then
|
||||
AC_MSG_ERROR("cannot find thread library installation")
|
||||
fi
|
||||
fi
|
||||
])
|
||||
])
|
||||
],
|
||||
dnl
|
||||
dnl Set flags according to what is cached.
|
||||
dnl
|
||||
CPPFLAGS="$cy_cv_threads_cflags"
|
||||
LIBS="$cy_cv_threads_libs"
|
||||
)
|
||||
])
|
||||
|
791
libguile/configure
vendored
791
libguile/configure
vendored
File diff suppressed because it is too large
Load diff
|
@ -36,11 +36,6 @@ AC_AIX
|
|||
AC_ISC_POSIX
|
||||
AC_MINIX
|
||||
|
||||
CY_AC_WITH_THREADS
|
||||
CFLAGS="$CFLAGS $cy_cv_threads_cflags"
|
||||
THREAD_LIBS="$cy_cv_threads_libs"
|
||||
AC_SUBST(THREAD_LIBS)
|
||||
|
||||
AC_C_CONST
|
||||
|
||||
AC_HEADER_STDC
|
||||
|
@ -71,6 +66,10 @@ GUILE_STRUCT_UTIMBUF
|
|||
xtra_PLUGIN_guile_libs=""
|
||||
AC_SUBST(xtra_PLUGIN_guile_libs)
|
||||
|
||||
AC_CHECK_LIB(m, main)
|
||||
AC_CHECK_LIB(socket, main)
|
||||
AC_CHECK_LIB(nsl, main)
|
||||
|
||||
if test "$enable_dynamic_linking" = "yes"; then
|
||||
|
||||
AC_CHECK_LIB(dl,dlopen)
|
||||
|
@ -83,9 +82,6 @@ if test "$ac_cv_lib_dld_dld_link" = "yes"; then
|
|||
xtra_PLUGIN_guile_libs="-lguile -ldld"
|
||||
AC_DEFINE(DYNAMIC_LINKING)
|
||||
else
|
||||
AC_CHECK_LIB(m, main)
|
||||
AC_CHECK_LIB(socket, main)
|
||||
AC_CHECK_LIB(nsl, main)
|
||||
AC_CHECK_FUNCS(shl_load)
|
||||
if test "$ac_cv_func_shl_load" = "yes"; then
|
||||
AC_DEFINE(DYNAMIC_LINKING)
|
||||
|
@ -203,6 +199,11 @@ fi
|
|||
#
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
CY_AC_WITH_THREADS
|
||||
CFLAGS="$CFLAGS $cy_cv_threads_cflags"
|
||||
THREAD_LIBS="$cy_cv_threads_libs"
|
||||
AC_SUBST(THREAD_LIBS)
|
||||
|
||||
dnl
|
||||
dnl Set the appropriate flags!
|
||||
dnl
|
||||
|
|
68
libguile/guile.c
Normal file
68
libguile/guile.c
Normal file
|
@ -0,0 +1,68 @@
|
|||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* As a special exception, the Free Software Foundation gives permission
|
||||
* for additional uses of the text contained in its release of GUILE.
|
||||
*
|
||||
* The exception is that, if you link the GUILE library with other files
|
||||
* to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the GUILE library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the
|
||||
* Free Software Foundation under the name GUILE. If you copy
|
||||
* code from other Free Software Foundation releases into a copy of
|
||||
* GUILE, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for GUILE, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*/
|
||||
|
||||
/* This is the 'main' function for the `guile' executable. It is not
|
||||
included in libguile.a.
|
||||
|
||||
Eventually, we hope this file will be automatically generated,
|
||||
based on the list of installed, statically linked libraries on the
|
||||
system. For now, please don't put interesting code in here. */
|
||||
|
||||
#include <libguile.h>
|
||||
|
||||
/* Debugger interface (don't change the order of the following lines) */
|
||||
#define GDB_TYPE SCM
|
||||
#include <libguile/gdb_interface.h>
|
||||
GDB_INTERFACE;
|
||||
|
||||
static void
|
||||
inner_main (void *closure, int argc, char **argv)
|
||||
{
|
||||
/* module initializations would go here */
|
||||
scm_shell (argc, argv);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
scm_boot_guile (argc, argv, inner_main, 0);
|
||||
return 0; /* never reached */
|
||||
}
|
|
@ -441,6 +441,7 @@ scm_boot_guile_1 (base, closure)
|
|||
scm_init_load_path ();
|
||||
scm_init_standard_ports ();
|
||||
scm_init_dynamic_linking ();
|
||||
scm_init_script ();
|
||||
initialized = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -99,6 +99,7 @@
|
|||
#include "libguile/read.h"
|
||||
#include "libguile/root.h"
|
||||
#include "libguile/scmsigs.h"
|
||||
#include "libguile/script.h"
|
||||
#include "libguile/sequences.h"
|
||||
#include "libguile/simpos.h"
|
||||
#include "libguile/snarf.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue