diff --git a/AUTHORS b/AUTHORS index 6491fa027..6df60d0d5 100644 --- a/AUTHORS +++ b/AUTHORS @@ -7,7 +7,6 @@ George Carrette: wrote files present in Siod version 2.3, released in December of 1989. 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, 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 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: Makefile.in configure.in lineio.scm poe.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 -ice-9/threads.scm. +Anthony Green: wrote the following files in libguile: + 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: In the subdirectory libguile, wrote: backtrace.c debug.c options.c root.c srcprop.c stacks.c 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.h fsu-pthreads.h mit-pthreads.h threads.h Many other changes throughout. diff --git a/INSTALL b/INSTALL index 3fb03ab6c..d62fc9846 100644 --- a/INSTALL +++ b/INSTALL @@ -26,13 +26,6 @@ The `make' command builds several things: talking with the Guile Scheme interpreter. - An object library `libguile/.libs/libguile.a', containing the Guile Scheme 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 and libraries mentioned above, as well as Guile's header files and diff --git a/Makefile.am b/Makefile.am index a6ac392aa..5345f7446 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,10 +1,6 @@ ## Process this file with automake to produce Makefile.in. -SUBDIRS = @existingdirs@ newdoc - -guile_dirs = @existingdirs@ newdoc -guile-dist: - $(MAKE) SUBDIRS="$(guile_dirs)" dist +SUBDIRS = libguile ice-9 qt ## FIXME: in the future there will be direct automake support for ## doing this. When that happens, switch over. diff --git a/Makefile.in b/Makefile.in index ff6515044..6871ffa12 100644 --- a/Makefile.in +++ b/Makefile.in @@ -49,14 +49,27 @@ POST_INSTALL = true NORMAL_UNINSTALL = true PRE_UNINSTALL = true POST_UNINSTALL = true +host_alias = @host_alias@ +host_triplet = @host@ +AWK = @AWK@ +CC = @CC@ +LIBLOBJS = @LIBLOBJS@ +LIBTOOL = @LIBTOOL@ MAINT = @MAINT@ PACKAGE = @PACKAGE@ +RANLIB = @RANLIB@ +THREAD_LIBS = @THREAD_LIBS@ 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 - -guile_dirs = @existingdirs@ newdoc +SUBDIRS = libguile ice-9 qt aclocaldir = $(datadir)/aclocal 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = ./libguile/scmconfig.h CONFIG_CLEAN_FILES = DATA = $(aclocal_DATA) DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ -Makefile.in NEWS TODO aclocal.m4 config.guess config.sub configure \ -configure.in install-sh ltconfig ltmain.sh mdate-sh missing \ +Makefile.in NEWS TODO acinclude.m4 aclocal.m4 config.guess config.sub \ +configure configure.in install-sh ltconfig ltmain.sh mdate-sh missing \ mkinstalldirs @@ -87,7 +101,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status -$(srcdir)/aclocal.m4: @MAINT@ configure.in +$(srcdir)/aclocal.m4: @MAINT@ configure.in acinclude.m4 cd $(srcdir) && $(ACLOCAL) config.status: configure @@ -272,6 +286,7 @@ clean: clean-recursive clean-am distclean: distclean-recursive distclean-am rm -f config.status + rm -f libtool maintainer-clean: maintainer-clean-recursive maintainer-clean-am @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 \ 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. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/README b/README index c44f89d57..0c128a9de 100644 --- a/README +++ b/README @@ -66,23 +66,15 @@ The Guile source tree is laid out as follows: doc: Documentation for Guile, in Texinfo form. (At the moment, these manuals are incomplete and are currently being revised.) libguile: - The Guile Scheme interpreter, packaged as an object library - for you to link with your programs. -guile: An interactive front end for the Guile Scheme interpreter. -rx: A regular expression matching library, interfaced to Guile. + The Guile Scheme interpreter --- both the object library + for you to link with your programs, and the executable you can run. 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 -from Washington University, which Guile can use. Qt is under a -separate copyright; see `qt/README' for more details. +qt: A cooperative threads package from Washington University, + which Guile can use. If you configure Guile with the + --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 ================================================== @@ -129,11 +121,11 @@ Mikael Djurfeldt designed and implemented: * the `threads' interface (rewriting Anthony Green's work), and * 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 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. Gary Houston wrote the Unix system call support, including the socket diff --git a/acconfig.h b/acconfig.h new file mode 100644 index 000000000..9ee531262 --- /dev/null +++ b/acconfig.h @@ -0,0 +1,74 @@ +/* acconfig.h --- documentation for symbols possibly defined in scmconfig.h + Jim Blandy --- 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 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 when we've already + #included . 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 diff --git a/acinclude.m4 b/acinclude.m4 new file mode 100644 index 000000000..65b4b11c2 --- /dev/null +++ b/acinclude.m4 @@ -0,0 +1,59 @@ +dnl On the NeXT, #including 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 +#else +#include +#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 +# include + ], + [], + [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 + ] +) diff --git a/aclocal.m4 b/aclocal.m4 index 0f2c4a9cd..b974194d4 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,5 +1,65 @@ dnl aclocal.m4 generated automatically by aclocal 1.1n +dnl On the NeXT, #including 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 +#else +#include +#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 +# include + ], + [], + [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 -- # some checks are only needed if your package does certain things. # 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_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_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_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" +) +]) + diff --git a/configure b/configure index 22998ac41..8c2710813 100755 --- a/configure +++ b/configure @@ -14,6 +14,16 @@ ac_default_prefix=/usr/local ac_help="$ac_help --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer" +ac_help="$ac_help + --disable-debug Don't include debugging support" +ac_help="$ac_help + --enable-dynamic-linking Include support for dynamic linking" +ac_help="$ac_help + --enable-guile-debug Include internal debugging functions" +ac_help="$ac_help + --enable-shared build shared libraries [default=yes]" +ac_help="$ac_help + --with-threads thread interface" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -552,7 +562,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:556: checking for a BSD compatible install" >&5 +echo "configure:566: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -609,16 +619,9 @@ PACKAGE=$PACKAGE VERSION=$VERSION -cat >> confdefs.h <> confdefs.h <&6 -echo "configure:622: checking whether build environment is sane" >&5 +echo "configure:625: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -665,7 +668,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x," missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:669: checking for working aclocal" >&5 +echo "configure:672: checking for working aclocal" >&5 # 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 (aclocal --version) > /dev/null 2>&1; then @@ -677,7 +680,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:681: checking for working autoconf" >&5 +echo "configure:684: checking for working autoconf" >&5 # 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 (autoconf --version) > /dev/null 2>&1; then @@ -689,7 +692,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:693: checking for working automake" >&5 +echo "configure:696: checking for working automake" >&5 # 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 (automake --version) > /dev/null 2>&1; then @@ -701,7 +704,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:705: checking for working autoheader" >&5 +echo "configure:708: checking for working autoheader" >&5 # 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 (autoheader --version) > /dev/null 2>&1; then @@ -713,7 +716,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:717: checking for working makeinfo" >&5 +echo "configure:720: checking for working makeinfo" >&5 # 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 (makeinfo --version) > /dev/null 2>&1; then @@ -725,7 +728,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:729: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:732: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -752,7 +755,7 @@ else fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:756: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:759: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -770,26 +773,2707 @@ fi -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` -opt_subdirs=`cat $srcdir/*/PLUGIN/OPT /dev/null | tsort | xargs echo` -subdirs="$all_subdirs" -for d in $all_subdirs; do - if test -d $srcdir/$d ; then - existingdirs="$existingdirs $d" - test -n "$silent" || echo Configuring plug-in component $d + +#-------------------------------------------------------------------- +# +# User options +# +#-------------------------------------------------------------------- + +# Check whether --enable-debug or --disable-debug was given. +if test "${enable_debug+set}" = set; then + enableval="$enable_debug" + : +fi + +if test "$enableval" != n && test "$enableval" != no; then + cat >> confdefs.h <<\EOF +#define DEBUG_EXTENSIONS 1 +EOF + + cat >> confdefs.h <<\EOF +#define READER_EXTENSIONS 1 +EOF + + LIBOBJS="backtrace.o stacks.o debug.o srcprop.o $LIBOBJS" +fi + +# Check whether --enable-dynamic-linking or --disable-dynamic-linking was given. +if test "${enable_dynamic_linking+set}" = set; then + enableval="$enable_dynamic_linking" + : +fi + + +# Check whether --enable-guile-debug or --disable-guile-debug was given. +if test "${enable_guile_debug+set}" = set; then + enableval="$enable_guile_debug" + : +fi + +if test "$enableval" = y || test "$enableval" = yes; then + cat >> confdefs.h <<\EOF +#define GUILE_DEBUG 1 +EOF + +fi + +#-------------------------------------------------------------------- + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:829: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:858: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + ac_prog_rejected=no + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:906: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:940: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:945: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes + ac_test_CFLAGS="${CFLAGS+set}" + ac_save_CFLAGS="$CFLAGS" + CFLAGS= + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:969: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 + if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" + elif test $ac_cv_prog_cc_g = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-O2" + fi +else + GCC= + test "${CFLAGS+set}" = set || CFLAGS="-g" +fi + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:997: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + + +# Make sure we can run config.sub. +if $ac_config_sub sun4 >/dev/null 2>&1; then : +else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } +fi + +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:1064: checking host system type" >&5 + +host_alias=$host +case "$host_alias" in +NONE) + case $nonopt in + NONE) + if host_alias=`$ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) host_alias=$nonopt ;; + esac ;; +esac + +host=`$ac_config_sub $host_alias` +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$host" 1>&6 + +# Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1087: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + + + + +# Always use our own libtool. +LIBTOOL='$(top_builddir)/libtool' + + +# Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + test "$enableval" = no && libtool_shared=" --disable-shared" +else + libtool_shared= +fi + + +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 \ +|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; } + + +echo $ac_n "checking for AIX""... $ac_c" 1>&6 +echo "configure:1156: checking for AIX" >&5 +cat > conftest.$ac_ext <&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF +#define _ALL_SOURCE 1 +EOF + +else + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* + + +echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 +echo "configure:1180: checking for POSIXized ISC" >&5 +if test -d /etc/conf/kconfig.d && + grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 +then + echo "$ac_t""yes" 1>&6 + ISC=yes # If later tests want to check for ISC. + cat >> confdefs.h <<\EOF +#define _POSIX_SOURCE 1 +EOF + + if test "$GCC" = yes; then + CC="$CC -posix" + else + CC="$CC -Xp" + fi +else + echo "$ac_t""no" 1>&6 + ISC= +fi + +ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 +echo "configure:1202: checking for minix/config.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + MINIX=yes +else + echo "$ac_t""no" 1>&6 +MINIX= +fi + +if test "$MINIX" = yes; then + cat >> confdefs.h <<\EOF +#define _POSIX_SOURCE 1 +EOF + + cat >> confdefs.h <<\EOF +#define _POSIX_1_SOURCE 2 +EOF + + cat >> confdefs.h <<\EOF +#define _MINIX 1 +EOF + +fi + + +echo $ac_n "checking for working const""... $ac_c" 1>&6 +echo "configure:1251: checking for working const" >&5 +if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if { (eval echo configure:1305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_const=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.h <<\EOF +#define const +EOF + +fi + + +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:1327: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +#include +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +if test "$cross_compiling" = yes; then + : +else + cat > conftest.$ac_ext < +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } + +EOF +if { (eval echo configure:1407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_header_stdc=no +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 +echo "configure:1435: checking for $ac_hdr that defines DIR" >&5 +if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include <$ac_hdr> +int main() { +DIR *dirp = 0; +; return 0; } +EOF +if { (eval echo configure:1448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then +echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 +echo "configure:1473: checking for opendir in -ldir" >&5 +ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldir $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="$LIBS -ldir" +else + echo "$ac_t""no" 1>&6 +fi + +else +echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 +echo "configure:1514: checking for opendir in -lx" >&5 +ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lx $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="$LIBS -lx" +else + echo "$ac_t""no" 1>&6 +fi + +fi + +echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +echo "configure:1556: checking whether time.h and sys/time.h may both be included" >&5 +if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +int main() { +struct tm *tp; +; return 0; } +EOF +if { (eval echo configure:1570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_time=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_time=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_header_time" 1>&6 +if test $ac_cv_header_time = yes; then + cat >> confdefs.h <<\EOF +#define TIME_WITH_SYS_TIME 1 +EOF + +fi + +echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 +echo "configure:1591: checking for sys/wait.h that is POSIX.1 compatible" >&5 +if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#ifndef WEXITSTATUS +#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) +#endif +#ifndef WIFEXITED +#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif +int main() { +int s; +wait (&s); +s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; +; return 0; } +EOF +if { (eval echo configure:1612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_sys_wait_h=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_sys_wait_h=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 +if test $ac_cv_header_sys_wait_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SYS_WAIT_H 1 +EOF + +fi + +for ac_hdr in 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 +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1636: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi done -for d in $req_subdirs; do - test -d $srcdir/$d || { - echo ERROR: Missing required package: $d 1>&2 - exit 1 - } + + for ac_hdr in libc.h unistd.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1677: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi done + echo $ac_n "checking "whether libc.h and unistd.h can be included together"""... $ac_c" 1>&6 +echo "configure:1714: checking "whether libc.h and unistd.h can be included together"" >&5 +if eval "test \"`echo '$''{'guile_cv_header_libc_with_unistd'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + 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 + cat > conftest.$ac_ext < +# include + +int main() { + +; return 0; } +EOF +if { (eval echo configure:1735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + guile_cv_header_libc_with_unistd=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + guile_cv_header_libc_with_unistd=no + +fi +rm -f conftest* + fi + + +fi + +echo "$ac_t""$guile_cv_header_libc_with_unistd" 1>&6 + if test "$guile_cv_header_libc_with_unistd" = yes; then + cat >> confdefs.h <<\EOF +#define LIBC_H_WITH_UNISTD_H 1 +EOF + + fi + + + +echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 +echo "configure:1762: checking for uid_t in sys/types.h" >&5 +if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "uid_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_uid_t=yes +else + rm -rf conftest* + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_type_uid_t" 1>&6 +if test $ac_cv_type_uid_t = no; then + cat >> confdefs.h <<\EOF +#define uid_t int +EOF + + cat >> confdefs.h <<\EOF +#define gid_t int +EOF + +fi + +echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 +echo "configure:1796: checking type of array argument to getgroups" >&5 +if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_type_getgroups=cross +else + cat > conftest.$ac_ext < +#define NGID 256 +#undef MAX +#define MAX(x, y) ((x) > (y) ? (x) : (y)) +main() +{ + gid_t gidset[NGID]; + int i, n; + union { gid_t gval; long lval; } val; + + val.lval = -1; + for (i = 0; i < NGID; i++) + gidset[i] = val.gval; + n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, + gidset); + /* Exit non-zero if getgroups seems to require an array of ints. This + happens when gid_t is short but getgroups modifies an array of ints. */ + exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); +} + +EOF +if { (eval echo configure:1829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + ac_cv_type_getgroups=gid_t +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_type_getgroups=int +fi +rm -fr conftest* +fi + +if test $ac_cv_type_getgroups = cross; then + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_getgroups=gid_t +else + rm -rf conftest* + ac_cv_type_getgroups=int +fi +rm -f conftest* + +fi +fi + +echo "$ac_t""$ac_cv_type_getgroups" 1>&6 +cat >> confdefs.h <&6 +echo "configure:1867: checking return type of signal handlers" >&5 +if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#ifdef signal +#undef signal +#endif +#ifdef __cplusplus +extern "C" void (*signal (int, void (*)(int)))(int); +#else +void (*signal ()) (); +#endif + +int main() { +int i; +; return 0; } +EOF +if { (eval echo configure:1889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_type_signal=void +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_type_signal=int +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_type_signal" 1>&6 +cat >> confdefs.h <&6 +echo "configure:1908: checking for mode_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_mode_t=yes +else + rm -rf conftest* + ac_cv_type_mode_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_mode_t" 1>&6 +if test $ac_cv_type_mode_t = no; then + cat >> confdefs.h <<\EOF +#define mode_t int +EOF + +fi + + +for ac_func in 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 +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:1944: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + +for ac_func in inet_aton putenv strerror +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2000: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +LIBOBJS="$LIBOBJS ${ac_func}.o" +fi +done + + + +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 +echo "configure:2058: checking for working alloca.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +char *p = alloca(2 * sizeof(int)); +; return 0; } +EOF +if { (eval echo configure:2070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ac_cv_header_alloca_h=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_alloca_h=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 +if test $ac_cv_header_alloca_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ALLOCA_H 1 +EOF + +fi + +echo $ac_n "checking for alloca""... $ac_c" 1>&6 +echo "configure:2091: checking for alloca" >&5 +if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +#endif + +int main() { +char *p = (char *) alloca(1); +; return 0; } +EOF +if { (eval echo configure:2119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ac_cv_func_alloca_works=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_func_alloca_works=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 +if test $ac_cv_func_alloca_works = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ALLOCA 1 +EOF + +fi + +if test $ac_cv_func_alloca_works = no; then + # The SVR3 libPW and SVR4 libucb both contain incompatible functions + # that cause trouble. Some versions do not even contain alloca or + # contain a buggy version. If you still want to use their alloca, + # use ar to extract alloca.o from them instead of compiling alloca.c. + ALLOCA=alloca.o + cat >> confdefs.h <<\EOF +#define C_ALLOCA 1 +EOF + + +echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 +echo "configure:2151: checking whether alloca needs Cray hooks" >&5 +if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5 | + egrep "webecray" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_os_cray=yes +else + rm -rf conftest* + ac_cv_os_cray=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_os_cray" 1>&6 +if test $ac_cv_os_cray = yes; then +for ac_func in _getb67 GETB67 getb67; do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2181: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <&6 +fi + +done +fi + +echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 +echo "configure:2236: checking stack direction for C alloca" >&5 +if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_c_stack_direction=0 +else + cat > conftest.$ac_ext < addr) ? 1 : -1; +} +main () +{ + exit (find_stack_direction() < 0); +} +EOF +if { (eval echo configure:2263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + ac_cv_c_stack_direction=1 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_c_stack_direction=-1 +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 +cat >> confdefs.h <&6 +echo "configure:2286: checking for st_rdev in struct stat" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct stat s; s.st_rdev; +; return 0; } +EOF +if { (eval echo configure:2299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_rdev=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_st_rdev=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6 +if test $ac_cv_struct_st_rdev = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST_RDEV 1 +EOF + +fi + +echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 +echo "configure:2320: checking for st_blksize in struct stat" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct stat s; s.st_blksize; +; return 0; } +EOF +if { (eval echo configure:2333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_blksize=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_st_blksize=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 +if test $ac_cv_struct_st_blksize = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST_BLKSIZE 1 +EOF + +fi + +echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 +echo "configure:2354: checking for st_blocks in struct stat" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct stat s; s.st_blocks; +; return 0; } +EOF +if { (eval echo configure:2367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_blocks=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_st_blocks=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6 +if test $ac_cv_struct_st_blocks = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST_BLOCKS 1 +EOF + +else + LIBOBJS="$LIBOBJS fileblocks.o" +fi + +echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 +echo "configure:2390: checking whether struct tm is in sys/time.h or time.h" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct tm *tp; tp->tm_sec; +; return 0; } +EOF +if { (eval echo configure:2403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_tm=time.h +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_tm=sys/time.h +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_struct_tm" 1>&6 +if test $ac_cv_struct_tm = sys/time.h; then + cat >> confdefs.h <<\EOF +#define TM_IN_SYS_TIME 1 +EOF + +fi + +echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 +echo "configure:2424: checking for tm_zone in struct tm" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include <$ac_cv_struct_tm> +int main() { +struct tm tm; tm.tm_zone; +; return 0; } +EOF +if { (eval echo configure:2437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_tm_zone=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_tm_zone=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 +if test "$ac_cv_struct_tm_zone" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_TM_ZONE 1 +EOF + +else + echo $ac_n "checking for tzname""... $ac_c" 1>&6 +echo "configure:2457: checking for tzname" >&5 +if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#ifndef tzname /* For SGI. */ +extern char *tzname[]; /* RS6000 and others reject char **tzname. */ +#endif +int main() { +atoi(*tzname); +; return 0; } +EOF +if { (eval echo configure:2472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ac_cv_var_tzname=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_var_tzname=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_var_tzname" 1>&6 + if test $ac_cv_var_tzname = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_TZNAME 1 +EOF + + fi +fi + + + echo $ac_n "checking whether we need POSIX to get struct utimbuf""... $ac_c" 1>&6 +echo "configure:2495: checking whether we need POSIX to get struct utimbuf" >&5 +if eval "test \"`echo '$''{'guile_cv_struct_utimbuf_needs_posix'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#else +#include +#endif +struct utime blah; + +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + guile_cv_struct_utimbuf_needs_posix=no +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + guile_cv_struct_utimbuf_needs_posix=yes +fi +rm -f conftest* +fi + +echo "$ac_t""$guile_cv_struct_utimbuf_needs_posix" 1>&6 + if test "$guile_cv_struct_utimbuf_needs_posix" = yes; then + cat >> confdefs.h <<\EOF +#define UTIMBUF_NEEDS_POSIX 1 +EOF + + fi + +# Checks for dynamic linking + +xtra_PLUGIN_guile_libs="" + + +echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 +echo "configure:2541: checking for main in -lm" >&5 +ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lm $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + +echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 +echo "configure:2584: checking for main in -lsocket" >&5 +ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsocket $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + +echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 +echo "configure:2627: checking for main in -lnsl" >&5 +ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + +if test "$enable_dynamic_linking" = "yes"; then + +echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +echo "configure:2673: checking for dlopen in -ldl" >&5 +ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + +if test "$ac_cv_lib_dl_dlopen" = "yes"; then + xtra_PLUGIN_guile_libs="-lguile -ldl" + cat >> confdefs.h <<\EOF +#define DYNAMIC_LINKING 1 +EOF + +else +echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 +echo "configure:2727: checking for dld_link in -ldld" >&5 +ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldld $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + +if test "$ac_cv_lib_dld_dld_link" = "yes"; then + xtra_PLUGIN_guile_libs="-lguile -ldld" + cat >> confdefs.h <<\EOF +#define DYNAMIC_LINKING 1 +EOF + +else +for ac_func in shl_load +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2783: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +if test "$ac_cv_func_shl_load" = "yes"; then + cat >> confdefs.h <<\EOF +#define DYNAMIC_LINKING 1 +EOF + +fi +fi +fi + +fi + +#-------------------------------------------------------------------- +# +# Which way does the stack grow? +# +#-------------------------------------------------------------------- + +if test "$cross_compiling" = yes; then + echo "configure: warning: Guessing that stack grows down -- see scmconfig.h.in" 1>&2 +else + cat > conftest.$ac_ext <= ((unsigned long)&x)); } + main () { int q; aux((unsigned long)&q); } +EOF +if { (eval echo configure:2862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + cat >> confdefs.h <<\EOF +#define SCM_STACK_GROWS_UP 1 +EOF + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -fr conftest* +fi + + + +if test "$cross_compiling" = yes; then + cat >> confdefs.h <<\EOF +#define SCM_SINGLES 1 +EOF + + echo "configure: warning: Guessing that sizeof(long) == sizeof(float) -- see scmconfig.h.in" 1>&2 +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + cat >> confdefs.h <<\EOF +#define SCM_SINGLES 1 +EOF + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -fr conftest* +fi + + +echo $ac_n "checking for struct linger""... $ac_c" 1>&6 +echo "configure:2904: checking for struct linger" >&5 +if eval "test \"`echo '$''{'scm_cv_struct_linger'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct linger lgr; lgr.l_linger = 100 +; return 0; } +EOF +if { (eval echo configure:2918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + scm_cv_struct_linger="yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + scm_cv_struct_linger="no" +fi +rm -f conftest* +fi + +echo "$ac_t""$scm_cv_struct_linger" 1>&6 +if test $scm_cv_struct_linger = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_LINGER 1 +EOF + +fi + +#-------------------------------------------------------------------- +# +# How can you violate a stdio abstraction by setting a stream's fd? +# +#-------------------------------------------------------------------- + +echo $ac_n "checking how to set a stream file descriptor""... $ac_c" 1>&6 +echo "configure:2945: checking how to set a stream file descriptor" >&5 +if eval "test \"`echo '$''{'scm_cv_fd_setter'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +stdout->_file = 1 +; return 0; } +EOF +if { (eval echo configure:2957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + scm_cv_fd_setter="_file" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cat > conftest.$ac_ext < +int main() { +stdout->_fileno = 1 +; return 0; } +EOF +if { (eval echo configure:2972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + scm_cv_fd_setter="_fileno" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + scm_cv_fd_setter="" +fi +rm -f conftest* +fi +rm -f conftest* +fi + + +if test "$scm_cv_fd_setter"; then + echo "$ac_t""$scm_cv_fd_setter" 1>&6 + cat >> confdefs.h <&6 +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. +#-------------------------------------------------------------------- + +echo $ac_n "checking how to get buffer char count from FILE structure""... $ac_c" 1>&6 +echo "configure:3010: checking how to get buffer char count from FILE structure" >&5 +if eval "test \"`echo '$''{'scm_cv_struct_file_count'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +FILE *f = stdin; f->_cnt = 0 +; return 0; } +EOF +if { (eval echo configure:3022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + scm_cv_struct_file_count="_cnt" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cat > conftest.$ac_ext < +int main() { +FILE *f = stdin; f->_r = 0 +; return 0; } +EOF +if { (eval echo configure:3037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + scm_cv_struct_file_count="_r" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cat > conftest.$ac_ext < +int main() { +FILE *f = stdin; f->readCount = 0 +; return 0; } +EOF +if { (eval echo configure:3052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + scm_cv_struct_file_count="readCount" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + scm_cv_struct_file_count="" +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* +fi + +if test "$scm_cv_struct_file_count"; then + echo "$ac_t""$scm_cv_struct_file_count" 1>&6 + cat >> confdefs.h <&6 +else + cat > conftest.$ac_ext < +int main() { +FILE *f = stdin; f->_gptr = f->egptr; +; return 0; } +EOF +if { (eval echo configure:3086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + scm_cv_struct_file_gptr=1 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + scm_cv_struct_file_gptr="" +fi +rm -f conftest* +fi + +if test "$scm_cv_struct_gptr"; then + echo "$ac_t""gptr" 1>&6 + cat >> confdefs.h <&6 +else + cat > conftest.$ac_ext < +int main() { +FILE *f = stdin; f->_IO_read_ptr = f->_IO_read_end; +; return 0; } +EOF +if { (eval echo configure:3116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + scm_cv_struct_file_readptr=1 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +fi + +if test "$scm_cv_struct_file_readptr"; then + echo "$ac_t""read_ptr" 1>&6 + cat >> confdefs.h <&6 +fi +fi +fi + +#-------------------------------------------------------------------- +# +# Flags for thread support +# +#-------------------------------------------------------------------- + + +echo $ac_n "checking "threads package type"""... $ac_c" 1>&6 +echo "configure:3146: checking "threads package type"" >&5 +if eval "test \"`echo '$''{'cy_cv_threads_package'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if eval "test \"`echo '$''{'cy_cv_threads_cflags'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if eval "test \"`echo '$''{'cy_cv_threads_libs'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +use_threads=no; +# Check whether --with-threads or --without-threads was given. +if test "${with_threads+set}" = set; then + withval="$with_threads" + use_threads=$withval +else + use_threads=no +fi + +test -n "$use_threads" || use_threads=qt +threads_package=unknown +if test "$use_threads" != no; then + 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 + CPPFLAGS="-I$use_threads/include" + LDFLAGS="-L$use_threads/lib" + LIBS="-lgthreads -lmalloc" + cat > conftest.$ac_ext < +int main() { + +pthread_equal(NULL,NULL); + +; return 0; } +EOF +if { (eval echo configure:3214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + threads_package=FSU +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + fi + if test "$threads_package" = unknown; then + LIBS="-lpthread" + cat > conftest.$ac_ext < +int main() { + +pthread_equal(NULL,NULL); + +; return 0; } +EOF +if { (eval echo configure:3235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + threads_package=MIT +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + fi + if test "$threads_package" = unknown; then + LIBS="-lpthreads" + cat > conftest.$ac_ext < +int main() { + +pthread_equal(NULL,NULL); + +; return 0; } +EOF +if { (eval echo configure:3256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + threads_package=PCthreads +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + fi + 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 + { echo "configure: error: "cannot find thread library installation"" 1>&2; exit 1; } + fi +fi + +fi + + +fi + + +fi + +echo "$ac_t""$cy_cv_threads_package" 1>&6 + +CFLAGS="$CFLAGS $cy_cv_threads_cflags" +THREAD_LIBS="$cy_cv_threads_libs" + + +if test "$cy_cv_threads_package" = FSU; then + cat >> confdefs.h <<\EOF +#define USE_FSU_PTHREADS 1 +EOF + + else if test "$cy_cv_threads_package" = COOP; then + cat >> confdefs.h <<\EOF +#define USE_COOP_THREADS 1 +EOF + + else if test "$cy_cv_threads_package" = MIT; then + cat >> confdefs.h <<\EOF +#define USE_MIT_PTHREADS 1 +EOF + + else if test "$cy_cv_threads_package" = PCthreads; then + cat >> confdefs.h <<\EOF +#define USE_PCTHREADS_PTHREADS 1 +EOF + + else if test "$cy_cv_threads_package" = unknown; then + { echo "configure: error: "cannot find threads installation"" 1>&2; exit 1; } + fi + fi + fi + fi +fi + +if test "$cy_cv_threads_package" != ""; then + cat >> confdefs.h <<\EOF +#define USE_THREADS 1 +EOF + + LIBOBJS="$LIBOBJS threads.o" +fi + +## If we're using GCC, ask for aggressive warnings. +case "$GCC" in + yes ) CFLAGS="$CFLAGS -Wall -Wpointer-arith" ;; +esac + +for ac_prog in mawk gawk nawk awk +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3336: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AWK="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +AWK="$ac_cv_prog_AWK" +if test -n "$AWK"; then + echo "$ac_t""$AWK" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$AWK" && break +done + + +## 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'`" + +cat >> confdefs.h <> confdefs.h <> confdefs.h </dev/null 2>&1; then : +else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } +fi + +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:3401: checking host system type" >&5 + +host_alias=$host +case "$host_alias" in +NONE) + case $nonopt in + NONE) + if host_alias=`$ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) host_alias=$nonopt ;; + esac ;; +esac + +host=`$ac_config_sub $host_alias` +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$host" 1>&6 + + +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 + + + +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:'`" + + + + + + + + trap '' 1 2 15 cat > confcache <<\EOF @@ -854,19 +3538,7 @@ fi trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs - +DEFS=-DHAVE_CONFIG_H # Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} @@ -904,7 +3576,7 @@ done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" -trap 'rm -fr `echo "Makefile newdoc/Makefile newdoc/ref/Makefile newdoc/tutorial/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "Makefile libguile/Makefile libguile/guile-snarf ice-9/Makefile qt/Makefile qt/qt.h qt/md/Makefile qt/time/Makefile libguile/scmconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then @@ -1048,112 +3740,125 @@ s%@INSTALL@%$INSTALL%g fi; done rm -f conftest.s* +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' +ac_dC='\3' +ac_dD='%g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' +ac_uC=' ' +ac_uD='\4%g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$%\1#\2define\3' +ac_eC=' ' +ac_eD='%g' + +if test "${CONFIG_HEADERS+set}" != set; then +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +fi +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + cat $ac_file_inputs > conftest.in + +EOF + +# Transform confdefs.h into a sed script conftest.vals that substitutes +# the proper values into config.h.in to produce config.h. And first: +# Protect against being on the right side of a sed subst in config.status. +# Protect against being in an unquoted here document in config.status. +rm -f conftest.vals +cat > conftest.hdr <<\EOF +s/[\\&%]/\\&/g +s%[\\$`]%\\&%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%ac_d%ac_u%gp +s%ac_u%ac_e%gp +EOF +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >> conftest.vals <<\EOF +s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +EOF + +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. + +rm -f conftest.tail +while : +do + ac_lines=`grep -c . conftest.vals` + # grep -c gives empty output for an empty file on some AIX systems. + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <> $CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + echo 'CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in +' >> $CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail + rm -f conftest.vals + mv conftest.tail conftest.vals +done +rm -f conftest.vals + +cat >> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then + echo "$ac_file is unchanged" + rm -f conftest.h + else + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + fi + rm -f $ac_file + mv conftest.h $ac_file + fi +fi; done + EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF - +test -z "$CONFIG_HEADERS" || echo timestamp > libguile/stamp-h +chmod +x libguile/guile-snarf exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 -if test "$no_recursion" != yes; then - - # Remove --cache-file and --srcdir arguments so they do not pile up. - ac_sub_configure_args= - ac_prev= - for ac_arg in $ac_configure_args; do - if test -n "$ac_prev"; then - ac_prev= - continue - fi - case "$ac_arg" in - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - ;; - *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; - esac - done - - for ac_config_dir in $all_subdirs; do - - # Do not complain, so a configure script can configure whichever - # parts of a large source tree are present. - if test ! -d $srcdir/$ac_config_dir; then - continue - fi - - echo configuring in $ac_config_dir - - case "$srcdir" in - .) ;; - *) - if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; - else - { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; } - fi - ;; - esac - - ac_popdir=`pwd` - cd $ac_config_dir - - # A "../" for each directory in /$ac_config_dir. - ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` - - case "$srcdir" in - .) # No --srcdir option. We are building in place. - ac_sub_srcdir=$srcdir ;; - /*) # Absolute path. - ac_sub_srcdir=$srcdir/$ac_config_dir ;; - *) # Relative path. - ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; - esac - - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_sub_srcdir/configure; then - ac_sub_configure=$ac_sub_srcdir/configure - elif test -f $ac_sub_srcdir/configure.in; then - ac_sub_configure=$ac_configure - else - echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2 - ac_sub_configure= - fi - - # The recursion is here. - if test -n "$ac_sub_configure"; then - - # Make the cache file name correct relative to the subdirectory. - case "$cache_file" in - /*) ac_sub_cache_file=$cache_file ;; - *) # Relative path. - ac_sub_cache_file="$ac_dots$cache_file" ;; - esac - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - - echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" - # The eval makes quoting arguments work. - if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir - then : - else - { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; } - fi - fi - - cd $ac_popdir - done -fi diff --git a/configure.in b/configure.in index 0dfd707a6..eea8d113d 100644 --- a/configure.in +++ b/configure.in @@ -1,28 +1,329 @@ dnl Process this file with autoconf to produce configure. AC_INIT(Makefile.in) . $srcdir/GUILE-VERSION -AM_INIT_AUTOMAKE($PACKAGE, $VERSION) +AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define) 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` -opt_subdirs=`cat $srcdir/*/PLUGIN/OPT /dev/null | tsort | xargs echo` +#-------------------------------------------------------------------- +# +# User options +# +#-------------------------------------------------------------------- -AC_CONFIG_SUBDIRS($all_subdirs) -for d in $all_subdirs; do - if test -d $srcdir/$d ; then - existingdirs="$existingdirs $d" - test -n "$silent" || echo Configuring plug-in component $d +AC_ARG_ENABLE(debug, +[ --disable-debug Don't include debugging support]) +if test "$enableval" != n && test "$enableval" != no; then + AC_DEFINE(DEBUG_EXTENSIONS) + 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 +#include ], + [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 ], + [stdout->_file = 1], + scm_cv_fd_setter="_file", + AC_TRY_COMPILE([#include ], + [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 ], + [FILE *f = stdin; f->_cnt = 0], + scm_cv_struct_file_count="_cnt", + AC_TRY_COMPILE([#include ], + [FILE *f = stdin; f->_r = 0], + scm_cv_struct_file_count="_r", + AC_TRY_COMPILE([#include ], + [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 ], + [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 ], + [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 + fi fi -done +fi -for d in $req_subdirs; do - test -d $srcdir/$d || { - echo ERROR: Missing required package: $d 1>&2 - exit 1 - } -done +if test "$cy_cv_threads_package" != ""; then + AC_DEFINE(USE_THREADS) + LIBOBJS="$LIBOBJS threads.o" +fi -AC_SUBST(existingdirs) -AC_OUTPUT(Makefile newdoc/Makefile newdoc/ref/Makefile newdoc/tutorial/Makefile) +## If we're using GCC, ask for aggressive warnings. +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: