1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00

Changes for reduced Guile distribution: one configure script,

no plugins.
* configure.in: Merged the old text from qt/configure.in and
libguile/configure.in; Tom Tromey says automake only wants one
configure.in script.  This seems fishy, but...
* Makefile.am: List the subdirectories explicitly; no more PLUGIN
gubbish.
* acconfig.h, acinclude.m4: Moved here from libguile, since
libguile's configure script lives here now.
* AUTHORS, INSTALL, README: Updated.
* Makefile.in, aclocal.m4 configure: Regenerated.  Just like
amputated amphibian limbs.
This commit is contained in:
Jim Blandy 1997-04-24 06:32:52 +00:00
parent ebe2a6c136
commit 3a629497d2
10 changed files with 3556 additions and 229 deletions

34
AUTHORS
View file

@ -7,7 +7,6 @@ George Carrette:
wrote files present in Siod version 2.3, released in December of 1989. wrote files present in Siod version 2.3, released in December of 1989.
Aubrey Jaffer: Aubrey Jaffer:
Wrote substantial portions of guile.texi, and surely others.
Changes to: eval.c, ioext.c, posix.c, gscm.c, scm.h, socket.c, Changes to: eval.c, ioext.c, posix.c, gscm.c, scm.h, socket.c,
gsubr.c, sys.c, test.scm, stime.c, and unif.c. gsubr.c, sys.c, test.scm, stime.c, and unif.c.
@ -15,43 +14,20 @@ Gary Houston: changes to many files in libguile.
wrote: libguile/socket.c, ice-9/expect.scm wrote: libguile/socket.c, ice-9/expect.scm
Tom Lord: Many changes throughout. Tom Lord: Many changes throughout.
In the subdirectory ctax, wrote:
Makefile.in configure.in hashtabs.scm macros.scm scm-ops.scm
c-ops.scm grammar.scm lexer.scm reader.scm
In the subdirectory gtcltk-lib, wrote:
Makefile.in guile-tcl.c guile-tk.c
configure.in guile-tcl.h guile-tk.h
In the subdirectory guile, wrote:
Makefile.in getopt.c getopt1.c
configure.in getopt.h guile.c
In the subdirectory ice-9, wrote: In the subdirectory ice-9, wrote:
Makefile.in configure.in lineio.scm poe.scm Makefile.in configure.in lineio.scm poe.scm
boot-9.scm hcons.scm mapping.scm boot-9.scm hcons.scm mapping.scm
In the subdirectory lang, wrote:
Makefile.in grammar.scm lr0.scm pp.scm
configure.in lex.scm lr1.scm
In the subdirectory rx, wrote:
Makefile.in runtests.c rxbitset.h rxnfa.c rxspencer.c
TESTS rx.c rxcontext.h rxnfa.h rxspencer.h
TESTS2C.sed rx.h rxcset.c rxnode.c rxstr.c
_rx.h rxall.h rxcset.h rxnode.h rxstr.h
configure.in rxanal.c rxdbug.c rxposix.c rxsuper.c
hashrexp.c rxanal.h rxgnucomp.c rxposix.h rxsuper.h
inst-rxposix.h rxbasic.c rxgnucomp.h rxproto.h rxunfa.c
rgx.c rxbasic.h rxhash.c rxsimp.c rxunfa.h
rgx.h rxbitset.c rxhash.h rxsimp.h testcases.h
In the subdirectory doc, wrote:
ctax.texi gtcltk.texi in.texi lang.texi
and portions of guile.texi.
Anthony Green: wrote the original code in the 'threads' directory, and Anthony Green: wrote the following files in libguile:
ice-9/threads.scm. coop-defs.h coop-threads.h fsu-pthreads.h mit-pthreads.h threads.h
coop-threads.c coop.c mit-pthreads.c threads.c
and ice-9/threads.scm.
Mikael Djurfeldt: Mikael Djurfeldt:
In the subdirectory libguile, wrote: In the subdirectory libguile, wrote:
backtrace.c debug.c options.c root.c srcprop.c stacks.c backtrace.c debug.c options.c root.c srcprop.c stacks.c
backtrace.h debug.h options.h root.h srcprop.h stacks.h backtrace.h debug.h options.h root.h srcprop.h stacks.h
In the subdirectory threads, rewrote: In the subdirectory libguile, rewrote:
coop-threads.c coop.c mit-pthreads.c threads.c coop-threads.c coop.c mit-pthreads.c threads.c
coop-threads.h fsu-pthreads.h mit-pthreads.h threads.h coop-threads.h fsu-pthreads.h mit-pthreads.h threads.h
Many other changes throughout. Many other changes throughout.

View file

@ -26,13 +26,6 @@ The `make' command builds several things:
talking with the Guile Scheme interpreter. talking with the Guile Scheme interpreter.
- An object library `libguile/.libs/libguile.a', containing the Guile Scheme - An object library `libguile/.libs/libguile.a', containing the Guile Scheme
interpreter, ready to be linked into your programs. interpreter, ready to be linked into your programs.
- An object library `gtcltk-lib/.libs/libgtcltk.a', containing a simple
interface between Guile and Tcl/Tk. This is only built if the
configure script notices that you have the appropriate version of
Tcl/Tk installed on your system already. If it is installed, `make'
will automatically include Tcl/Tk and the interface in the guile
shell. If the interface were documented, we'd include a pointer to
it here.
To install Guile, type `make install'. This installs the executable To install Guile, type `make install'. This installs the executable
and libraries mentioned above, as well as Guile's header files and and libraries mentioned above, as well as Guile's header files and

View file

@ -1,10 +1,6 @@
## Process this file with automake to produce Makefile.in. ## Process this file with automake to produce Makefile.in.
SUBDIRS = @existingdirs@ newdoc SUBDIRS = libguile ice-9 qt
guile_dirs = @existingdirs@ newdoc
guile-dist:
$(MAKE) SUBDIRS="$(guile_dirs)" dist
## FIXME: in the future there will be direct automake support for ## FIXME: in the future there will be direct automake support for
## doing this. When that happens, switch over. ## doing this. When that happens, switch over.

View file

@ -49,14 +49,27 @@ POST_INSTALL = true
NORMAL_UNINSTALL = true NORMAL_UNINSTALL = true
PRE_UNINSTALL = true PRE_UNINSTALL = true
POST_UNINSTALL = true POST_UNINSTALL = true
host_alias = @host_alias@
host_triplet = @host@
AWK = @AWK@
CC = @CC@
LIBLOBJS = @LIBLOBJS@
LIBTOOL = @LIBTOOL@
MAINT = @MAINT@ MAINT = @MAINT@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
THREAD_LIBS = @THREAD_LIBS@
VERSION = @VERSION@ VERSION = @VERSION@
existingdirs = @existingdirs@ qtmd_h = @qtmd_h@
qtmdb_s = @qtmdb_s@
qtmdc_c = @qtmdc_c@
qtmdc_o = @qtmdc_o@
qtmds_o = @qtmds_o@
qtmds_s = @qtmds_s@
target_libs = @target_libs@
xtra_PLUGIN_guile_libs = @xtra_PLUGIN_guile_libs@
SUBDIRS = @existingdirs@ newdoc SUBDIRS = libguile ice-9 qt
guile_dirs = @existingdirs@ newdoc
aclocaldir = $(datadir)/aclocal aclocaldir = $(datadir)/aclocal
aclocal_DATA = guile.m4 threads.m4 aclocal_DATA = guile.m4 threads.m4
@ -64,12 +77,13 @@ aclocal_DATA = guile.m4 threads.m4
EXTRA_DIST = $(aclocal_DATA) ltconfig ltmain.sh HACKING GUILE-VERSION EXTRA_DIST = $(aclocal_DATA) ltconfig ltmain.sh HACKING GUILE-VERSION
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ./libguile/scmconfig.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
DATA = $(aclocal_DATA) DATA = $(aclocal_DATA)
DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
Makefile.in NEWS TODO aclocal.m4 config.guess config.sub configure \ Makefile.in NEWS TODO acinclude.m4 aclocal.m4 config.guess config.sub \
configure.in install-sh ltconfig ltmain.sh mdate-sh missing \ configure configure.in install-sh ltconfig ltmain.sh mdate-sh missing \
mkinstalldirs mkinstalldirs
@ -87,7 +101,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \ cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
$(srcdir)/aclocal.m4: @MAINT@ configure.in $(srcdir)/aclocal.m4: @MAINT@ configure.in acinclude.m4
cd $(srcdir) && $(ACLOCAL) cd $(srcdir) && $(ACLOCAL)
config.status: configure config.status: configure
@ -272,6 +286,7 @@ clean: clean-recursive clean-am
distclean: distclean-recursive distclean-am distclean: distclean-recursive distclean-am
rm -f config.status rm -f config.status
rm -f libtool
maintainer-clean: maintainer-clean-recursive maintainer-clean-am maintainer-clean: maintainer-clean-recursive maintainer-clean-am
@echo "This command is intended for maintainers to use;" @echo "This command is intended for maintainers to use;"
@ -290,8 +305,6 @@ install-data install uninstall all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \ distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean mostlyclean distclean maintainer-clean
guile-dist:
$(MAKE) SUBDIRS="$(guile_dirs)" dist
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.

26
README
View file

@ -66,23 +66,15 @@ The Guile source tree is laid out as follows:
doc: Documentation for Guile, in Texinfo form. (At the moment, these doc: Documentation for Guile, in Texinfo form. (At the moment, these
manuals are incomplete and are currently being revised.) manuals are incomplete and are currently being revised.)
libguile: libguile:
The Guile Scheme interpreter, packaged as an object library The Guile Scheme interpreter --- both the object library
for you to link with your programs. for you to link with your programs, and the executable you can run.
guile: An interactive front end for the Guile Scheme interpreter.
rx: A regular expression matching library, interfaced to Guile.
ice-9: Guile's module system, initialization code, and other infrastructure. ice-9: Guile's module system, initialization code, and other infrastructure.
lang: A Guile module of tools for writing lexical analyzers and parsers.
ctax: A Guile module providing a C-like syntax for Scheme.
gtcltk-lib:
Glue code for talking to Tcl/Tk from Guile. The Tcl/Tk
developers have big plans for the next major release of Tcl/Tk
which will make possible a clean, direct interface between
Guile and Tk, so we're providing this very simple-minded
interface until that's ready.
This distribution also includes `qt', a cooperative threads package qt: A cooperative threads package from Washington University,
from Washington University, which Guile can use. Qt is under a which Guile can use. If you configure Guile with the
separate copyright; see `qt/README' for more details. --with-threads flag, you will need to link against the -lqt
library, found in this directory. Qt is under a separate
copyright; see `qt/README' for more details.
Hacking It Yourself ================================================== Hacking It Yourself ==================================================
@ -129,11 +121,11 @@ Mikael Djurfeldt designed and implemented:
* the `threads' interface (rewriting Anthony Green's work), and * the `threads' interface (rewriting Anthony Green's work), and
* detection of circular references during printing. * detection of circular references during printing.
Mark Galassi contributed the Guile high-level functions (libgh), and Mark Galassi contributed the Guile high-level functions (gh_*), and
wrote the guile-programmer and guile-user manuals. (These are in the wrote the guile-programmer and guile-user manuals. (These are in the
process of revision.) process of revision.)
Anthony Green wrote the original version of `threads' the interface Anthony Green wrote the original version of `threads', the interface
between Guile and qt. between Guile and qt.
Gary Houston wrote the Unix system call support, including the socket Gary Houston wrote the Unix system call support, including the socket

74
acconfig.h Normal file
View file

@ -0,0 +1,74 @@
/* acconfig.h --- documentation for symbols possibly defined in scmconfig.h
Jim Blandy <jimb@cyclic.com> --- August 1996 */
/* Define these two if you want support for debugging of Scheme
programs. */
#undef DEBUG_EXTENSIONS
#undef READER_EXTENSIONS
/* Define this if your system has a way to set a stdio stream's file
descriptor. */
#undef FD_SETTER
/* Set this to the name of a field in FILE which contains the number
of buffered characters waiting to be read. */
#undef FILE_CNT_FIELD
/* Define this if your stdio has _gptr and _egptr fields which can
be compared to give the number of buffered characters waiting to
be read. */
#undef FILE_CNT_GPTR
/* Define this if your stdio has _IO_read_ptr and _IO_read_end fields
which can be compared to give the number of buffered characters
waiting to be read. */
#undef FILE_CNT_READPTR
/* Define this if your system defines struct linger, for use with the
getsockopt and setsockopt system calls. */
#undef HAVE_STRUCT_LINGER
/* Define this if floats are the same size as longs. */
#undef SCM_SINGLES
/* Define this if a callee's stack frame has a higher address than the
caller's stack frame. On most machines, this is not the case. */
#undef SCM_STACK_GROWS_UP
/* Define this if <utime.h> doesn't define struct utimbuf unless
_POSIX_SOURCE is #defined. See GUILE_STRUCT_UTIMBUF in aclocal.m4. */
#undef UTIMBUF_NEEDS_POSIX
/* Define this if we should #include <libc.h> when we've already
#included <unistd.h>. On some systems, they conflict, and libc.h
should be omitted. See GUILE_HEADER_LIBC_WITH_UNISTD in
aclocal.m4. */
#undef LIBC_H_WITH_UNISTD_H
/* Define these to indicate the current version of Guile. These
values are supposed to be supplied by the configuration system. */
#undef GUILE_MAJOR_VERSION
#undef GUILE_MINOR_VERSION
#undef GUILE_VERSION
/* Define this to include various undocumented functions used to debug
the Guile library itself. */
#undef GUILE_DEBUG
/* Define if using cooperative multithreading. */
#undef USE_COOP_THREADS
/* Define if using "FSU" pthreads. */
#undef USE_FSU_PTHREADS
/* Define if using MIT pthreads. */
#undef USE_MIT_PTHREADS
/* Define if using PCthreads pthreads. */
#undef USE_PCTHREADS_PTHREADS
/* Define if using any sort of threads. */
#undef USE_THREADS
/* Define if you want support for dynamic linking. */
#undef DYNAMIC_LINKING

59
acinclude.m4 Normal file
View file

@ -0,0 +1,59 @@
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
]
)

218
aclocal.m4 vendored
View file

@ -1,5 +1,65 @@
dnl aclocal.m4 generated automatically by aclocal 1.1n 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
]
)
# Do all the work for Automake. This macro actually does too much -- # Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things. # some checks are only needed if your package does certain things.
# But this isn't really a big deal. # But this isn't really a big deal.
@ -108,3 +168,161 @@ AC_DEFUN(AM_MAINTAINER_MODE,
] ]
) )
# 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([,]))])
# 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="../threads/libthreads.a ../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="../threads/libthreads.a ../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"
)
])

2991
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -1,28 +1,329 @@
dnl Process this file with autoconf to produce configure. dnl Process this file with autoconf to produce configure.
AC_INIT(Makefile.in) AC_INIT(Makefile.in)
. $srcdir/GUILE-VERSION . $srcdir/GUILE-VERSION
AM_INIT_AUTOMAKE($PACKAGE, $VERSION) AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
AM_CONFIG_HEADER(libguile/scmconfig.h)
dnl FIXME: tsort, xargs not GNU standard. #--------------------------------------------------------------------
all_subdirs=`cat $srcdir/*/PLUGIN/REQ $srcdir/*/PLUGIN/OPT /dev/null | tsort | xargs echo` #
req_subdirs=`cat $srcdir/*/PLUGIN/REQ /dev/null | tsort | xargs echo` # User options
opt_subdirs=`cat $srcdir/*/PLUGIN/OPT /dev/null | tsort | xargs echo` #
#--------------------------------------------------------------------
AC_CONFIG_SUBDIRS($all_subdirs) AC_ARG_ENABLE(debug,
for d in $all_subdirs; do [ --disable-debug Don't include debugging support])
if test -d $srcdir/$d ; then if test "$enableval" != n && test "$enableval" != no; then
existingdirs="$existingdirs $d" AC_DEFINE(DEBUG_EXTENSIONS)
test -n "$silent" || echo Configuring plug-in component $d AC_DEFINE(READER_EXTENSIONS)
LIBOBJS="backtrace.o stacks.o debug.o srcprop.o $LIBOBJS"
fi
AC_ARG_ENABLE(dynamic-linking,
[ --enable-dynamic-linking Include support for dynamic linking])
AC_ARG_ENABLE(guile-debug,
[ --enable-guile-debug Include internal debugging functions])
if test "$enableval" = y || test "$enableval" = yes; then
AC_DEFINE(GUILE_DEBUG)
fi
#--------------------------------------------------------------------
AC_PROG_CC
AC_PROG_CPP
AM_PROG_LIBTOOL
AC_AIX
AC_ISC_POSIX
AC_MINIX
AC_C_CONST
AC_HEADER_STDC
AC_HEADER_DIRENT
AC_HEADER_TIME
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(libc.h limits.h malloc.h memory.h string.h sys/ioctl.h sys/select.h sys/time.h sys/timeb.h sys/times.h sys/types.h sys/utime.h time.h unistd.h utime.h)
GUILE_HEADER_LIBC_WITH_UNISTD
AC_TYPE_GETGROUPS
AC_TYPE_SIGNAL
AC_TYPE_MODE_T
AC_CHECK_FUNCS(ctermid ftime getcwd geteuid gethostent gettimeofday lstat mkdir mknod nice readlink rename rmdir select setegid seteuid setlocale setpgid setsid strftime strptime symlink sync tcgetpgrp tcsetpgrp times uname waitpid)
AC_REPLACE_FUNCS(inet_aton putenv strerror)
AC_FUNC_ALLOCA
AC_STRUCT_ST_RDEV
AC_STRUCT_ST_BLKSIZE
AC_STRUCT_ST_BLOCKS
AC_STRUCT_TIMEZONE
GUILE_STRUCT_UTIMBUF
# Checks for dynamic linking
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)
if test "$ac_cv_lib_dl_dlopen" = "yes"; then
xtra_PLUGIN_guile_libs="-lguile -ldl"
AC_DEFINE(DYNAMIC_LINKING)
else
AC_CHECK_LIB(dld,dld_link)
if test "$ac_cv_lib_dld_dld_link" = "yes"; then
xtra_PLUGIN_guile_libs="-lguile -ldld"
AC_DEFINE(DYNAMIC_LINKING)
else
AC_CHECK_FUNCS(shl_load)
if test "$ac_cv_func_shl_load" = "yes"; then
AC_DEFINE(DYNAMIC_LINKING)
fi
fi
fi
fi
#--------------------------------------------------------------------
#
# Which way does the stack grow?
#
#--------------------------------------------------------------------
AC_TRY_RUN(aux (l) unsigned long l;
{ int x; exit (l >= ((unsigned long)&x)); }
main () { int q; aux((unsigned long)&q); },
AC_DEFINE(SCM_STACK_GROWS_UP),,AC_MSG_WARN(Guessing that stack grows down -- see scmconfig.h.in))
AC_TRY_RUN(main () { exit (sizeof(float) != sizeof(long)); },
AC_DEFINE(SCM_SINGLES),,AC_DEFINE(SCM_SINGLES)
AC_MSG_WARN(Guessing that sizeof(long) == sizeof(float) -- see scmconfig.h.in))
AC_MSG_CHECKING(for struct linger)
AC_CACHE_VAL(scm_cv_struct_linger,
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>],
[struct linger lgr; lgr.l_linger = 100],
scm_cv_struct_linger="yes",
scm_cv_struct_linger="no"))
AC_MSG_RESULT($scm_cv_struct_linger)
if test $scm_cv_struct_linger = yes; then
AC_DEFINE(HAVE_STRUCT_LINGER)
fi
#--------------------------------------------------------------------
#
# How can you violate a stdio abstraction by setting a stream's fd?
#
#--------------------------------------------------------------------
AC_MSG_CHECKING(how to set a stream file descriptor)
AC_CACHE_VAL(scm_cv_fd_setter,
AC_TRY_COMPILE([#include <stdio.h>],
[stdout->_file = 1],
scm_cv_fd_setter="_file",
AC_TRY_COMPILE([#include <stdio.h>],
[stdout->_fileno = 1],
scm_cv_fd_setter="_fileno",
scm_cv_fd_setter="")))
if test "$scm_cv_fd_setter"; then
AC_MSG_RESULT($scm_cv_fd_setter)
AC_DEFINE_UNQUOTED(FD_SETTER, $scm_cv_fd_setter)
else
AC_MSG_RESULT(we couldn't do it!)
fi
#--------------------------------------------------------------------
# How to find out whether a FILE structure contains buffered data.
# From Tk we have the following list:
# _cnt: Most UNIX systems
# __cnt: HPUX
# _r: BSD
# readCount: Sprite
# Or, in GNU libc there are two fields, _gptr and _egptr, which
# have to be compared.
# These can also be known as _IO_read_ptr and _IO_read_end.
#--------------------------------------------------------------------
AC_MSG_CHECKING(how to get buffer char count from FILE structure)
AC_CACHE_VAL(scm_cv_struct_file_count,
AC_TRY_COMPILE([#include <stdio.h>],
[FILE *f = stdin; f->_cnt = 0],
scm_cv_struct_file_count="_cnt",
AC_TRY_COMPILE([#include <stdio.h>],
[FILE *f = stdin; f->_r = 0],
scm_cv_struct_file_count="_r",
AC_TRY_COMPILE([#include <stdio.h>],
[FILE *f = stdin; f->readCount = 0],
scm_cv_struct_file_count="readCount",
scm_cv_struct_file_count=""))))
if test "$scm_cv_struct_file_count"; then
AC_MSG_RESULT($scm_cv_struct_file_count)
AC_DEFINE_UNQUOTED(FILE_CNT_FIELD, $scm_cv_struct_file_count)
else
AC_CACHE_VAL(scm_cv_struct_file_gptr,
AC_TRY_COMPILE([#include <stdio.h>],
[FILE *f = stdin; f->_gptr = f->egptr;],
scm_cv_struct_file_gptr=1,
scm_cv_struct_file_gptr=""))
if test "$scm_cv_struct_gptr"; then
AC_MSG_RESULT(gptr)
AC_DEFINE_UNQUOTED(FILE_CNT_GPTR, $scm_cv_struct_file_gptr)
else
AC_CACHE_VAL(scm_cv_struct_file_readptr,
AC_TRY_COMPILE([#include <stdio.h>],
[FILE *f = stdin; f->_IO_read_ptr = f->_IO_read_end;],
scm_cv_struct_file_readptr=1))
if test "$scm_cv_struct_file_readptr"; then
AC_MSG_RESULT(read_ptr)
AC_DEFINE_UNQUOTED(FILE_CNT_READPTR, $scm_cv_struct_file_readptr)
else
AC_MSG_RESULT(we couldn't do it!)
fi
fi
fi
#--------------------------------------------------------------------
#
# Flags for thread support
#
#--------------------------------------------------------------------
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
if test "$cy_cv_threads_package" = FSU; then
AC_DEFINE(USE_FSU_PTHREADS, 1)
else if test "$cy_cv_threads_package" = COOP; then
AC_DEFINE(USE_COOP_THREADS, 1)
else if test "$cy_cv_threads_package" = MIT; then
AC_DEFINE(USE_MIT_PTHREADS, 1)
else if test "$cy_cv_threads_package" = PCthreads; then
AC_DEFINE(USE_PCTHREADS_PTHREADS, 1)
else if test "$cy_cv_threads_package" = unknown; then
AC_MSG_ERROR("cannot find threads installation")
fi fi
done fi
fi
fi
fi
for d in $req_subdirs; do if test "$cy_cv_threads_package" != ""; then
test -d $srcdir/$d || { AC_DEFINE(USE_THREADS)
echo ERROR: Missing required package: $d 1>&2 LIBOBJS="$LIBOBJS threads.o"
exit 1 fi
}
done
AC_SUBST(existingdirs) ## If we're using GCC, ask for aggressive warnings.
AC_OUTPUT(Makefile newdoc/Makefile newdoc/ref/Makefile newdoc/tutorial/Makefile) case "$GCC" in
yes ) CFLAGS="$CFLAGS -Wall -Wpointer-arith" ;;
esac
AC_PROG_AWK
## If we're creating a shared library (using libtool!), then we'll
## need to generate a list of .lo files corresponding to the .o files
## given in LIBOBJS. We'll call it LIBLOBJS.
LIBLOBJS="`echo ${LIBOBJS} | sed 's/\.o/.lo/g'`"
AC_DEFINE_UNQUOTED(GUILE_MAJOR_VERSION, "$GUILE_MAJOR_VERSION")
AC_DEFINE_UNQUOTED(GUILE_MINOR_VERSION, "$GUILE_MINOR_VERSION")
AC_DEFINE_UNQUOTED(GUILE_VERSION, "$GUILE_VERSION")
AC_SUBST(AWK)
AC_SUBST(LIBLOBJS)
dnl ======================================================================
dnl configuration for the Qt package
dnl ======================================================================
threads_enabled=false
if test "$cy_cv_threads_package" = COOP; then
threads_enabled=true
fi
# Determine the host we are working on
AC_CANONICAL_HOST
changequote(,)dnl We use [ and ] in a regexp in the case
case "$host" in
i[3456]86-*-*)
qtmds_s=$srcdir/md/i386.s
qtmd_h=$srcdir/md/i386.h
qtmdc_c=$srcdir/md/null.c
;;
mips-sgi-irix5*)
qtmds_s=$srcdir/md/mips-irix5.s
qtmd_h=$srcdir/md/mips.h
qtmdc_c=$srcdir/md/null.c
qtdmdb_s=$srcdir/md/mips_b.s
;;
mips-*-*)
qtmds_s=$srcdir/md/mips.s
qtmd_h=$srcdir/md/mips.h
qtmdc_c=$srcdir/md/null.c
qtdmdb_s=$srcdir/md/mips_b.s
;;
sparc-sun-solaris2.*)
qtmd_h=$srcdir/md/sparc.h
qtmdc_c=$srcdir/md/null.c
qtmds_s=$srcdir/md/sparc.s
qtdmdb_s=$srcdir/md/sparc_b.s
;;
sparc-*-*)
qtmd_h=$srcdir/md/sparc.h
qtmdc_c=$srcdir/md/null.c
qtmds_s=$srcdir/md/_sparc.s
qtdmdb_s=$srcdir/md/_sparc_b.s
;;
*)
echo "Unknown configuration; threads package disabled"
threads_enabled=false
;;
esac
changequote([, ])
if $threads_enabled; then
target_libs=libqt.a
else
target_libs=
fi
# Give the Makefile the names of the object files that will be
# generated by compiling $qtmdc_c and $qtmds_s.
qtmdc_o="`echo ${qtmdc_c} | sed -e 's:^.*/::' | sed -e 's:\.c$:\.o:'`"
qtmds_o="`echo ${qtmds_s} | sed -e 's:^.*/::' | sed -e 's:\.s$:\.o:'`"
AC_SUBST(target_libs)
AC_SUBST(qtmd_h)
AC_SUBST(qtmdc_c)
AC_SUBST(qtmdc_o)
AC_SUBST(qtmds_s)
AC_SUBST(qtmds_o)
AC_SUBST(qtmdb_s)
AC_OUTPUT([Makefile libguile/Makefile libguile/guile-snarf ice-9/Makefile qt/Makefile qt/qt.h qt/md/Makefile qt/time/Makefile], [chmod +x libguile/guile-snarf])
dnl Local Variables:
dnl comment-start: "dnl "
dnl comment-end: ""
dnl comment-start-skip: "\\bdnl\\b\\s *"
dnl End: