- add extra/guile script
- add patch/guile-1.5.6-3.patch
diff -purNX .cvsignore ../mknetrel.jcn5.split/ChangeLog ./ChangeLog
--- ../mknetrel.jcn5.split/ChangeLog Tue Jul 9 01:19:07 2002
+++ ./ChangeLog Tue Jul 9 01:20:44 2002
@@ -1,5 +1,12 @@
2002-07-09 Jan Nieuwenhuizen <[EMAIL PROTECTED]>
+ * VERSION mknetrel.jcn6.guile
+
+ * bin/mknetrel (setvars): New variable: patch.
+
+ * extra/guile:
+ * patch/guile: New file.
+
* VERSION mknetrel.jcn5.split
* bin/mknetrel (read_user_config): Add build_prefix as
diff -purNX .cvsignore ../mknetrel.jcn5.split/bin/mknetrel ./bin/mknetrel
--- ../mknetrel.jcn5.split/bin/mknetrel Tue Jul 9 01:05:42 2002
+++ ./bin/mknetrel Tue Jul 9 01:05:20 2002
@@ -65,6 +65,7 @@ setvars() {
inst=$here/inst/$package
uploads=$here/uploads
extra=$mknetrel/extra
+ patch=$mknetrel/patch
tarstem=$uploads/$package
src_exclude='>>>InExPlIbAbLe<<<'
}
diff -purNX .cvsignore ../mknetrel.jcn5.split/extra/guile ./extra/guile
--- ../mknetrel.jcn5.split/extra/guile Thu Jan 1 01:00:00 1970
+++ ./extra/guile Tue Jul 9 01:28:04 2002
@@ -0,0 +1,179 @@
+# -*- shell-script -*-
+
+# Guile specific mknetrel overrides
+# To use this, do something like:
+cat >/dev/null <<EOC
+
+ # alpha is down? then you'll have to trust me :) -- jcn
+ # wget -P/tmp ftp://alpha.gnu.org/pub/gnu/guile/guile-1.5.6.tar.gz
+ # tar xzf /tmp/guile-1.5.6.tar.gz
+ wget -P/tmp
+ftp://lilypond.org/pub/LilyPond/cygwin/tar/guile/guile-1.5.6-*-orig.tar.bz2
+ rm -rf /home/cygwin/netrel/src/guile-*
+ mkdir -p /home/cygwin/netrel/src && cd /home/cygwin/netrel/src
+ tar xjf /tmp/guile-1.5.6-*orig.tar.bz2
+ mv guile-1.5.6 guile-1.5.6-3
+ cd -
+ ./bin/mknetrel -x guile
+
+EOC
+
+# Note that although mknetrel will package guile-1.5.6-3, the Cygwin
+# packages for guile-1.5.6-3 have not (yet) been generated with this
+# script, but rather with the cygwin-cross tools from:
+
+# http://lilypond.org/cygwin/cygwin-cross.tar.gz
+
+# This is still in the testing phase.
+
+
+
+
+# stable Guile releases: guile-1.4.1
+# archive=ftp://ftp.gnu.org/pub/gnu
+
+# development releases
+# archive=ftp://alpha.gnu.org/pub/gnu
+
+# alpha is off line...
+archive=$local_archive
+BUILD=3
+sover=14
+
+subpackages="lib devel doc"
+
+needdevoflags () {
+ return 1
+}
+
+dodownload ()
+{
+ _download $package*.tar.gz -orig$cygtargz
+}
+
+dopatchsrc () {
+ cd $src
+ patch -p1 < $patch/$package.patch
+ aclocal
+ rm -rf libltdl
+ libtoolize --force --copy --automake --ltdl
+ autoheader
+ autoconf
+
+ # automake --add-missing
+ # Nicholas sez:
+
+ rm -f depcomp install-sh mkinstalldirs missing # etc, must look
+ automake --add-missing --copy --include-deps
+}
+
+# Move to mknetrel?
+patchsrc () {
+ [ -r $patch/$package.patch -a ! -d $src/CYGWIN-PATCHES ] && dopatchsrc
+}
+
+# do I have a broken setup, do the Guile developers not know how to
+# write configure.in and Makefile.am, or are automake/libtool broken?
+preconfig () { # aka libtool_woes ()
+
+ # Add to mknetrel?
+ patchsrc
+
+ cd $build || exit 1
+
+ # What's this? docme
+ # LIBS=`i686-pc-cygwin-gcc --print-file-name=binmode.o`
+ # LIBS=`i686-pc-cygwin-gcc --print-file-name=textmode.o`
+ # export LIBS
+
+ # Help automake with confusing EXEEXT variable.
+ # In our case, we actually have: BUILD_EXEXT= HOST_EXEEXT=.exe
+ EXTRABUILDARGS="EXEEXT="
+ EXTRAINSTALLARGS="EXEEXT="
+
+ # Convince libtool that 'SED=' won't work.
+ export SED=sed
+
+ # Can't add these to CFLAGS/LDFLAGS, would end up in libguile.*
+ # and thus show in guile-config script
+
+ libtoolflags="-I$cygwin_prefix/include -L$cygwin_prefix/lib
+-L$cygwin_prefix/lib/w32api -L$cygwin_prefix/bin"
+ # libtoolflags=$("$build_cc" -print-search-dirs | grep '^libraries:' | sed -e
+'s/^libraries: */ :/' -e 's/:/ -L/g' -e 's/ */ /g' -e 's/ *$//')
+ guileflags="-L../libguile/.libs"
+ build_cc="${build_cc} $libtoolflags $guileflags"
+ build_cxx="${build_cxx} $libtoolflags $guileflags"
+
+ # Fix libtool's -rpath detection
+ export CC="${build_cc}"
+ export CXX="${build_cxx}"
+
+ # another libtool fix
+ mkdir -p libguile/.libs
+
+ # anyway, Libtool doesn't like it
+ # libtool: link: cannot build libtool library `libguile.la' from non-libtool
+objects on this host: /home/cygwin/cygwin-1.3.10/usr/lib/textmode.o
+
+ # Let's adhere to mkconfig connvention, but why not use CONFIG_SITE?
+ # build_config_opts="${build_config_opts} --cache-file=/dev/null"
+ # export CONFIG_SITE=$(pwd)/config.site
+ # cat < < E OF > config.site
+
+ build_config_opts="${build_config_opts} --config-cache"
+ cat <<EOF > config.cache
+
+ac_cv_c_bigendian=${ac_cv_c_bigendian=no}
+ac_cv_sizeof_char_p=${ac_cv_sizeof_char_p=4}
+ac_cv_sizeof_char=${ac_cv_sizeof_char=1}
+ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
+ac_cv_sizeof_long=${ac_cv_sizeof_long=4}
+ac_cv_sizeof_float=${ac_cv_sizeof_float=4}
+ac_cv_sizeof_double=${ac_cv_sizeof_double=8}
+ac_cv_c_long_size_t=${ac_cv_c_long_size_t=no}
+ac_cv_c_long_time_t=${ac_cv_c_long_time_t=yes}
+ac_cv_sys_restartable_syscalls=${ac_cv_sys_restartable_syscalls=no}
+ac_cv_sprintf_count=${ac_cv_sprintf_count=yes}
+ac_cv_spinlocks=${ac_cv_spinlocks=no}
+ac_cv_func_getpgrp_void=${ac_cv_func_getpgrp_void=yes}
+ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed=no}
+ac_cv_func_mkfifo=yes
+guile_cv_func_usleep_declared=${guile_cv_func_usleep_declared=yes}
+
+# Try at preventing to break make rules while crosscompiling. This
+# used work, but nowadays ./configure thinks it knows better than me.
+
+# But what ./configure doesn't know, is that automake and libtool are
+# broken wrt cross-building, and wrt cc_for_build. See new
+# workarounds above.
+
+ac_exeext=${ac_exeext=}
+ac_cv_exeext=${ac_cv_exeext=}
+guile_cv_exeext=${guile_cv_exeext=}
+EOF
+}
+
+
+postconfig () {
+ # Here's another lib for you, libtool
+ cp -f libtool guile-readline
+}
+
+#prebuild () {
+# false # shell here
+#}
+
+
+presplit () {
+ ## Cygwin doesn't adhere to FHS (and why should they?)
+ ##docdir=$build_prefix/share/doc/$name-$version
+ docdir=$build_prefix/doc/$name-$ver
+
+ cd $src
+ mkdir -p $inst/$docdir || exit 1
+ ## cp -p ANON-CVS AUTHORS BUGS COPYING ChangeLog HACKING INSTALL LICENSE NEWS
+README SNAPSHOTS THANKS $inst/$docdir
+ cp -p ANON-CVS AUTHORS BUGS COPYING ChangeLog HACKING INSTALL NEWS README SNAPSHOTS
+THANKS $inst/$docdir
+ cp -p CYGWIN-PATCHES/README $inst/$docdir/README.Cygwin
+ cp -p CYGWIN-PATCHES/changelog $inst/$docdir/changelog.Cygwin
+ mkdir -p $inst/$build_prefix/doc/Cygwin || exit 1
+ cp -p CYGWIN-PATCHES/README $inst/$build_prefix/doc/Cygwin/$package.README
+ mkdir -p $inst/$build_prefix/man/man1 || exit 1
+ cp -p doc/guile.1 $inst/$build_prefix/man/man1
+}
diff -purNX .cvsignore ../mknetrel.jcn5.split/patch/guile-1.5.6-3.patch
./patch/guile-1.5.6-3.patch
--- ../mknetrel.jcn5.split/patch/guile-1.5.6-3.patch Thu Jan 1 01:00:00 1970
+++ ./patch/guile-1.5.6-3.patch Mon Jul 8 17:05:45 2002
@@ -0,0 +1,1274 @@
+diff -purN /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/README
+./CYGWIN-PATCHES/README
+--- /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/README Thu Jan 1 01:00:00
+1970
++++ ./CYGWIN-PATCHES/README Fri Jul 5 11:15:29 2002
+@@ -0,0 +1,61 @@
++Guile
++------------------------------------------
++The GNU extension language and Scheme interpreter.
++
++Runtime requirements:
++ cygwin-1.3.10 or newer
++ libguile14
++
++Build requirements:
++ cygwin-1.3.10 or newer
++ binutils-20011102 or newer
++ gcc-2.95.3-5 or newer
++ autoconf CVS (20020703) or newer,
++ autoconf-devel-2.53a-1 should be ok.
++ automake CVS (20020703) or newer,
++ automake-devel-1.6.1-3 should be ok.
++ libtool CVS (20020703) or newer,
++ libtool-devel-20020502-2 should be ok.
++
++Canonical homepage:
++ http://www.gnu.org/software/guile/
++
++Canonical download:
++ ftp://ftp.gnu.org/pub/gnu/guile/
++
++------------------------------------
++
++Build instructions:
++
++ unpack guile-1.5.6-3-src.tar.bz2
++ if you use setup to install this src package, it will be
++ unpacked under /usr/src automatically
++ cd /usr/src
++ DISTDIR=/usr/src ./guile-1.5.6-3.sh all
++
++This will create:
++ $DISTDIR/guile/guile-1.5.6-3-orig.tar.bz2
++ $DISTDIR/guile/guile-1.5.6-3-src.tar.bz2
++ $DISTDIR/guile/guile-1.5.6-3.tar.bz2
++ $DISTDIR/guile/guile-doc/guile-doc-1.5.6-3.tar.bz2
++ $DISTDIR/guile/libguile-devel/libguile-devel-1.5.6-3.tar.bz2
++ $DISTDIR/guile/libguile14/libguile14-1.5.6-3.tar.bz2
++
++------------------
++
++Port notes:
++
++ Patches with Cygwin compile fixes and cross building fixes have
++ been sent upstream.
++
++ These packages were built on GNU/Linux using cross building and
++ packaging scripts:
++
++ http://lilypond.org/cygwin/cygwin-cross.tar.gz
++
++ that process has been captured in cross-guile-1.5.6-3.sh
++
++ Jan Nieuwenhuizen
++ [EMAIL PROTECTED]
++
++Cygwin port maintained by: Jan Nieuwenhuizen <[EMAIL PROTECTED]>
+diff -purN /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/changelog
+./CYGWIN-PATCHES/changelog
+--- /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/changelog Thu Jan 1 01:00:00
+1970
++++ ./CYGWIN-PATCHES/changelog Fri Jul 5 11:17:21 2002
+@@ -0,0 +1,36 @@
++guile (1.5.6-3) unstable; urgency=low
++
++ * Bugfix for native buildscript.
++
++ -- Jan Nieuwenhuizen <[EMAIL PROTECTED]> Fri, 5 Jul 2002 11:17:21 +0200
++
++guile (1.5.6-2) unstable; urgency=low
++
++ * Fix srfi library names.
++ * Development package now named libguile-devel (previously
++ libguile14-dev.
++ * Import libs *.dll.a now in libguile-devel package.
++ * Add external-source: to all subpackage's .hint files.
++ * Fix permissions (sticky bit) and ownership of tarball contents.
++ * guile.m4 now in libguile-devel:/usr/share/aclocal (previously
++ erroneoulsy in libguile14:/usr/aclocal).
++ * Strip /usr/bin/guile.exe; upstream install apparently doesn't do
++ this.
++ * Prefix generated cross build script with 'cross-'.
++ * Add a native Cygwin buildscript, the generic build script at
++ http://cygwin.com/setup.html, modified by pasting splitting and
++ (sub)packaging from the cross build scripts. Somewhat tested, runs
++ fine on GNU/Linux.
++ * Fix install of guile.1 manual for guile-1.5.6-release.
++
++ -- Jan Nieuwenhuizen <[EMAIL PROTECTED]> Fri, 5 Jul 2002 02:06:38 +0200
++
++Guile (1.5.6-1) unstable; urgency=low
++
++ * Initial Release.
++
++ -- Jan Nieuwenhuizen <[EMAIL PROTECTED]> Thu, 3 Jul 2002 04:28:07 +0200
++
++Local variables:
++mode: debian-changelog
++End:
+diff -purN /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/guile-doc.hint
+./CYGWIN-PATCHES/guile-doc.hint
+--- /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/guile-doc.hint Thu Jan 1
+01:00:00 1970
++++ ./CYGWIN-PATCHES/guile-doc.hint Thu Jul 4 18:25:25 2002
+@@ -0,0 +1,9 @@
++sdesc: "The GNU extension language and Scheme interpreter (documentation)"
++category: doc
++requires: cygwin
++external-source: guile
++ldesc: "The GNU extension language and Scheme interpreter (documentation)
++This package contains the documentation for guile, including both
++a reference manual (via `info guile'), and a tutorial (via `info
++guile-tut')."
++
+diff -purN /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/guile.hint
+./CYGWIN-PATCHES/guile.hint
+--- /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/guile.hint Thu Jan 1 01:00:00
+1970
++++ ./CYGWIN-PATCHES/guile.hint Thu Jul 4 12:11:15 2002
+@@ -0,0 +1,12 @@
++sdesc: "The GNU extension language and Scheme interpreter (executable)"
++category: interpreters
++requires: cygwin libguile14
++ldesc: "The GNU extension language and Scheme interpreter (executable)
++Guile, the GNU Ubiquitous Intelligent Language for Extension, is a scheme
++implementation designed for real world programming, supporting a
++rich Unix interface, a module system, and undergoing rapid development.
++
++`guile' is a scheme interpreter that can execute scheme scripts (with a
++#! line at the top of the file), or run as an inferior scheme
++process inside Emacs."
++
+diff -purN /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/guile.sh
+./CYGWIN-PATCHES/guile.sh
+--- /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/guile.sh Thu Jan 1 01:00:00
+1970
++++ ./CYGWIN-PATCHES/guile.sh Fri Jul 5 11:08:31 2002
+@@ -0,0 +1,339 @@
++#!/bin/sh
++
++# Generic Cygwin build script -- modified for guile-1.5.6
++# Jan Nieuwenhuizen <[EMAIL PROTECTED]>
++#
++# Note: guile-1.5.6 has not been built using this script,
++# but rather using the cross build scripts at:
++#
++# http://lilypond.org/cygwin/cygwin-cross.tar.gz
++#
++# that process has been captured in cross-guile-1.5.6-2.sh
++#
++# TODO:
++#
++# * Shell scripts should start with: set -e
++# * More generic sub-package handling
++
++
++# find out where the build script is located
++tdir=`echo "$0" | sed 's%[\\/][^\\/][^\\/]*$%%'`
++test "x$tdir" = "x$0" && tdir=.
++scriptdir=`cd $tdir; pwd`
++# find src directory.
++# If scriptdir ends in SPECS, then topdir is $scriptdir/..
++# If scriptdir ends in CYGWIN-PATCHES, then topdir is $scriptdir/../..
++# Otherwise, we assume that topdir = scriptdir
++topdir1=`echo ${scriptdir} | sed 's%/SPECS$%%'`
++topdir2=`echo ${scriptdir} | sed 's%/CYGWIN-PATCHES$%%'`
++if [ "x$topdir1" != "x$scriptdir" ] ; then # SPECS
++ topdir=`cd ${scriptdir}/..; pwd`
++else
++ if [ "x$topdir2" != "x$scriptdir" ] ; then # CYGWIN-PATCHES
++ topdir=`cd ${scriptdir}/../..; pwd`
++ else
++ topdir=`cd ${scriptdir}; pwd`
++ fi
++fi
++
++tscriptname=`basename $0 .sh`
++export PKG=`echo $tscriptname | sed -e 's/\-[^\-]*\-[^\-]*$//'`
++export VER=`echo $tscriptname | sed -e 's/^[^\-]*\-//' -e 's/\-[^\-]*$//'`
++export REL=`echo $tscriptname | sed -e 's/^[^\-]*\-[^\-]*\-//'`
++export FULLPKG=${PKG}-${VER}-${REL}
++# if the orig src package is bzip2'ed, remember to
++# change 'z' to 'j' in the 'tar xvzf' commands in the
++# prep) and mkpatch) sections
++export src_orig_pkg_name=${FULLPKG}-orig.tar.bz2
++export src_pkg_name=${FULLPKG}-src.tar.bz2
++export src_patch_name=${FULLPKG}.patch
++export bin_pkg_name=${FULLPKG}.tar.bz2
++
++export src_orig_pkg=${topdir}/${src_orig_pkg_name}
++export src_pkg=${topdir}/${src_pkg_name}
++export src_patch=${topdir}/${src_patch_name}
++export bin_pkg=${topdir}/${bin_pkg_name}
++export srcdir=${topdir}/${PKG}-${VER}
++export objdir=${srcdir}/.build
++export instdir=${srcdir}/.inst
++export srcinstdir=${srcdir}/.sinst
++export checkfile=${topdir}/${FULLPKG}.check
++# run on
++host=`gcc -dumpmachine`
++# if this package creates binaries, they run on
++target=$host
++prefix=/usr
++sysconfdir=/etc
++MY_CFLAGS="-O2 -g"
++MY_LDFLAGS=
++
++mkdirs() {
++ (cd ${topdir} && \
++ mkdir -p ${objdir} && \
++ mkdir -p ${instdir} && \
++ mkdir -p ${srcinstdir} )
++}
++prep() {
++ (cd ${topdir} && \
++ tar xvjf ${src_orig_pkg} ; \
++ cd ${topdir}/$PKG-$VER && \
++ patch -p0 < ${src_patch} \
++ && mkdirs )
++}
++conf() {
++ (cd ${objdir} && \
++ CFLAGS="${MY_CFLAGS}" LDFLAGS="${MY_LDFLAGS}" \
++ ${srcdir}/configure --host=${host} --target=${target} \
++ --srcdir=${srcdir} --prefix=${prefix} \
++ --exec-prefix=${prefix} --sysconfdir=${sysconfdir} \
++ --libdir=${prefix}/lib --includedir=${prefix}/include \
++ --libexecdir='${sbindir}' --localstatedir=/var \
++ --datadir='${prefix}/share'
++)
++}
++build() {
++ (export SED=sed # libtool fix
++ cd ${objdir} && \
++ CFLAGS="${MY_CFLAGS}" make )
++}
++check() {
++ (cd ${objdir} && \
++ make test | tee ${checkfile} 2>&1 )
++}
++clean() {
++ (cd ${objdir} && \
++ make clean )
++}
++install() {
++ (export SED=sed # libtool fix
++ cd ${objdir} && \
++ make install DESTDIR=${instdir}
++ if [ -f ${instdir}${prefix}/info/dir ] ; then \
++ rm ${instdir}${prefix}/info/dir ; \
++ fi && \
++ if [ ! -d ${instdir}${prefix}/doc/${PKG}-${VER} ]; then \
++ mkdir -p ${instdir}${prefix}/doc/${PKG}-${VER} ; \
++ fi && \
++ if [ ! -d ${instdir}${prefix}/doc/Cygwin ]; then \
++ mkdir -p ${instdir}${prefix}/doc/Cygwin ; \
++ fi && \
++ templist=""; \
++ for f in ${srcdir}/ANNOUNCE ${srcdir}/CHANGES ${srcdir}/INSTALL \
++ ${srcdir}/KNOWNBUG ${srcdir}/LICENSE ${srcdir}/README \
++ ${srcdir}/TODO ; do \
++ if [ -f $f ] ; then \
++ templist="$templist $f"; \
++ fi ; \
++ done && \
++ if [ ! "x$templist" = "x" ]; then \
++ /usr/bin/install -m 644 $templist \
++ ${instdir}${prefix}/doc/${PKG}-${VER} ;
++ fi && \
++ if [ -f ${srcdir}/CYGWIN-PATCHES/${PKG}.README ]; then \
++ /usr/bin/install -m 644 ${srcdir}/CYGWIN-PATCHES/${PKG}.README \
++ ${instdir}${prefix}/doc/Cygwin/${PKG}-${VER}.README ; \
++ else \
++ if [ -f ${srcdir}/CYGWIN-PATCHES/README ]; then \
++ /usr/bin/install -m 644 ${srcdir}/CYGWIN-PATCHES/README \
++ ${instdir}${prefix}/doc/Cygwin/${PKG}-${VER}.README ; \
++ fi ;\
++ fi ; \
++ if [ -f ${srcdir}/CYGWIN-PATCHES/${PKG}.changelog ]; then \
++ /usr/bin/install -m 644 ${srcdir}/CYGWIN-PATCHES/changelog \
++ ${instdir}${prefix}/doc/${PKG}-${VER}/changelog.Cygwin ; \
++ fi ; \
++ if [ -f ${srcdir}/CYGWIN-PATCHES/postinstall.sh ]; then \
++ if [ ! -d ${instdir}${sysconfdir}/postinstall ]; then \
++ mkdir -p ${instdir}${sysconfdir}/postinstall ; \
++ fi ; \
++ /usr/bin/install -m 755 ${srcdir}/CYGWIN-PATCHES/postinstall.sh \
++ ${instdir}${sysconfdir}/postinstall/${PKG}.sh; \
++ fi
++ )
++}
++strip() {
++ (cd ${instdir} && \
++ find . -name "*.dll" | xargs strip > /dev/null 2>&1
++ find . -name "*.exe" | xargs strip > /dev/null 2>&1 ) || true # for Linux
++}
++simplepkg() {
++ (cd ${instdir} && \
++ tar cvjf ${bin_pkg} * )
++}
++split() {
++ # this all very package-specific
++
++ # setup compatibility vars
++ cyggz=.bz2
++ cygtargz=.tar$cyggz
++ czf="--owner=0 --group=0 -cjf"
++ name=$PKG
++ cygpack=$FULLPKG
++ tardir=$topdir
++ sourcedir=$srcdir
++ installroot=$instdir
++
++ ### BEGIN imported from cygwin-cross/stage/guile-1.5.6.postinstall
++
++ ## this fixes suffixes, already done here
++ ## . $stagedir/native.postinstall
++
++ ## Cygwin doesn't adhere to FHS (and why should they?)
++ ##docdir=$prefix/share/doc/$name-$version
++ docdir=$prefix/doc/$name-$version
++
++ # guile
++
++ (cd $sourcedir
++
++ ## already done here
++ ## strip $installroot/$prefix/bin/guile.exe
++
++ mkdir -p $installroot/$docdir
++ ## cp -p ANON-CVS AUTHORS BUGS COPYING ChangeLog HACKING INSTALL LICENSE NEWS
+README SNAPSHOTS THANKS $installroot/$docdir
++ cp -p ANON-CVS AUTHORS BUGS COPYING ChangeLog HACKING INSTALL NEWS README
+SNAPSHOTS THANKS $installroot/$docdir
++ cp -p CYGWIN-PATCHES/README $installroot/$docdir/README.Cygwin
++ cp -p CYGWIN-PATCHES/changelog $installroot/$docdir/changelog.Cygwin
++ mkdir -p $installroot/$prefix/doc/Cygwin
++ cp -p CYGWIN-PATCHES/README $installroot/$prefix/doc/Cygwin/$cygpack.README
++ mkdir -p $installroot/$prefix/man/man1
++ cp -p doc/guile.1 $installroot/$prefix/man/man1)
++
++ # libguileX
++
++ rm -rf $installroot-lib$name$SO
++ mkdir -p $installroot-lib$name$SO
++
++ (cd $installroot-lib$name$SO
++ mkdir -p ./$prefix/bin
++ mv $installroot/$prefix/bin/*.dll ./$prefix/bin
++ # mkdir -p ./$prefix/man/man1
++ # mv $installroot/$prefix/man/man1/guile-* ./$prefix/man/man1
++ mkdir -p ./$prefix/share
++ mv $installroot/$prefix/share/guile ./$prefix/share)
++
++ # libguile-devel
++
++ rm -rf $installroot-lib$name-devel
++ mkdir -p $installroot-lib$name-devel
++
++ (cd $installroot-lib$name-devel
++ mkdir -p ./$prefix/bin
++ mv $installroot/$prefix/bin/guile-* ./$prefix/bin
++ mv $installroot/$prefix/include ./$prefix/include
++ mkdir -p ./$prefix/lib
++ mv $installroot/$prefix/lib/*.a ./$prefix/lib
++ mv $installroot/$prefix/lib/*.la ./$prefix/lib
++ mkdir -p ./$prefix/share
++ mv $installroot/$prefix/share/aclocal ./$prefix/share)
++
++ # guile-doc
++
++ rm -rf $installroot-$name-doc
++ mkdir -p $installroot-$name-doc
++
++ (cd $installroot-$name-doc
++ mkdir -p ./$prefix
++ mv $installroot/$prefix/info ./$prefix)
++
++ ### END imported from cygwin-cross/stage/guile-1.5.6.postinstall
++}
++pkg() {
++ # this all very package-specific
++
++ # setup compatibility vars
++ cyggz=.bz2
++ cygtargz=.tar$cyggz
++ czf="--owner=0 --group=0 -cjf"
++ name=$PKG
++ cygpack=$FULLPKG
++ tardir=$topdir
++ sourcedir=$srcdir
++ installroot=$instdir
++
++ ### BEGIN imported from cygwin-cross/stage/guile-1.5.6.tar
++
++ # guile
++
++ mkdir -p $tardir/$name
++
++ # ugh, automate and fix this
++ chmod -R a-s+rX $installroot
++ chmod -R g-w $installroot
++ (cd $installroot/ && tar $czf $tardir/$name/$cygpack$cygtargz *)
++ cp -pv $sourcedir/CYGWIN-PATCHES/$name.hint $tardir/$name/setup.hint
++
++ # libguileX libguile-devel guile-doc
++
++ for i in lib$name$SO lib$name-devel $name-doc; do
++ mkdir -p $tardir/$name/$i
++ cygpacki=$i-$version-$build
++ # ugh, automate and fix this
++ chmod -R a-s+rX $installroot-$i
++ chmod -R g-w $installroot-$i
++ (cd $installroot-$i/ && tar $czf $tardir/$name/$i/$cygpacki$cygtargz *)
++ cp -pv $sourcedir/CYGWIN-PATCHES/$i.hint $tardir/$name/$i/setup.hint
++ done
++
++ ## hmm? already in template.dowload...
++ ## binball=$(ls -utr1 $tardir/$name/$cygpack$cygtargz 2>/dev/null | tail -1)
++
++
++ ### END imported from cygwin-cross/stage/guile-1.5.6.tar
++
++}
++mkpatch() {
++ (cd ${srcdir} && \
++ tar xvjf ${src_orig_pkg} ;\
++ mv ${PKG}-${VER} ../${PKG}-${VER}-orig && \
++ cd ${topdir} && \
++ rm -f autom4te.cache config.cache && \
++ diff -urN -x '.build' -x '.inst' -x '.sinst' \
++ ${PKG}-${VER}-orig ${PKG}-${VER} > \
++ ${srcinstdir}/${src_patch_name} ; \
++ rm -rf ${PKG}-${VER}-orig )
++}
++spkg() {
++ (mkpatch && \
++ cp ${src_orig_pkg} ${srcinstdir}/${src_orig_pkg_name} && \
++ cp $0 ${srcinstdir}/`basename $0` && \
++ cd ${srcinstdir} && \
++ tar cvjf ${src_pkg} * )
++}
++finish() {
++ rm -rf ${srcdir}
++}
++echo "$0"
++case $1 in
++ prep) prep ; STATUS=$? ;;
++ mkdirs) mkdirs; STATUS=$? ;;
++ conf) conf ; STATUS=$? ;;
++ build) build ; STATUS=$? ;;
++ check) check ; STATUS=$? ;;
++ clean) clean ; STATUS=$? ;;
++ install) install ; STATUS=$? ;;
++ strip) strip ; STATUS=$? ;;
++ split) split ; STATUS=$? ;;
++ package) pkg ; STATUS=$? ;;
++ pkg) pkg ; STATUS=$? ;;
++ mkpatch) mkpatch ; STATUS=$? ;;
++ src-package) spkg ; STATUS=$? ;;
++ spkg) spkg ; STATUS=$? ;;
++ finish) finish ; STATUS=$? ;;
++ all) prep && conf && build && install && \
++ strip && split && pkg && spkg && finish ; \
++ STATUS=$? ;;
++ *) cat <<EOF
++Usage:
++
++ $0 STAGE
++
++Where
++
++ STAGE: all prep conf build install strip split pkg spkg finish
++
++EOF
++ # Usage error
++ exit 2 ;;
++esac
++exit ${STATUS}
+diff -purN /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/libguile-devel.hint
+./CYGWIN-PATCHES/libguile-devel.hint
+--- /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/libguile-devel.hint Thu Jan 1
+01:00:00 1970
++++ ./CYGWIN-PATCHES/libguile-devel.hint Thu Jul 4 18:26:00 2002
+@@ -0,0 +1,9 @@
++sdesc: "Development headers and static libraries for Guile."
++category: development libs
++requires: cygwin
++external-source: guile
++ldesc: "Development headers and static libraries for Guile.
++`libguile.h' etc. C headers, aclocal macros, the `guile-snarf' and
++`guile-config' utilities, and static `libguile.a' libraries for Guile,
++the GNU Ubiquitous Intelligent Language for Extension."
++
+diff -purN /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/libguile14.hint
+./CYGWIN-PATCHES/libguile14.hint
+--- /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/libguile14.hint Thu Jan 1
+01:00:00 1970
++++ ./CYGWIN-PATCHES/libguile14.hint Thu Jul 4 18:25:32 2002
+@@ -0,0 +1,8 @@
++sdesc: "The GNU extension language and Scheme interpreter (runtime libraries)"
++category: libs
++requires: cygwin
++external-source: guile
++ldesc: "The GNU extension language and Scheme interpreter (runtime libraries)
++Guile shared object libraries and the ice-9 scheme module. Guile is
++the GNU Ubiquitous Intelligent Language for Extension."
++
+diff -purN /home/fred/usr/src/guile-1.5.6/ChangeLog ./ChangeLog
+--- /home/fred/usr/src/guile-1.5.6/ChangeLog Tue Mar 5 01:12:26 2002
++++ ./ChangeLog Fri Jul 5 02:03:22 2002
+@@ -1,3 +1,13 @@
++2002-07-03 Jan Nieuwenhuizen <[EMAIL PROTECTED]>
++
++ * autogen.sh: Only fix libltdl/configure.in if it exists. Current
++ libtool CVS does not need this fix.
++
++ * configure.in (AC_LIBTOOL_WIN32_DLL): Add for shared Cygwin
++ build.
++ Add --with-cc-for-build option to re-enable cross building.
++ Add --with-guile-for-build option to re-enable cross building.
++
+ 2002-03-04 Rob Browning <[EMAIL PROTECTED]>
+
+ * Guile beta 1.5.6 released.
+diff -purN /home/fred/usr/src/guile-1.5.6/INSTALL ./INSTALL
+--- /home/fred/usr/src/guile-1.5.6/INSTALL Tue Aug 14 23:44:53 2001
++++ ./INSTALL Thu Jul 4 18:20:05 2002
+@@ -199,6 +199,29 @@ switches specific to Guile you may find
+ --disable-regex --- omit regular expression interfaces
+
+
++Cross building Guile =====================================================
++
++As of guile-1.5.x, the build process uses compiled C files for
++snarfing, and (indirectly, through libtool) for linking, and uses the
++guile executable for generating documentation.
++
++When cross building guile, you first need to configure, build and
++install guile for your build host.
++
++Then, you may configure guile for cross building, eg:
++
++ ./configure --host=i686-pc-cygwin --disable-shared
++
++Two special options for cross building are available:
++
++--with-cc-for-build --- native C compiler, to be used during build
++ defaults to: `PATH=/usr/bin:$PATH cc'
++
++--with-guile-for-build --- native C compiler, to be used during build
++ defaults to: `guile', assuming you just
++ installed this guile natively.
++
++
+ Using Guile Without Installing It =========================================
+
+ If you want to run Guile without installing it, set the environment
+diff -purN /home/fred/usr/src/guile-1.5.6/am/ChangeLog ./am/ChangeLog
+--- /home/fred/usr/src/guile-1.5.6/am/ChangeLog Sun Mar 3 21:34:07 2002
++++ ./am/ChangeLog Thu Jul 4 03:28:08 2002
+@@ -1,3 +1,8 @@
++2002-07-03 Jan Nieuwenhuizen <[EMAIL PROTECTED]>
++
++ * pre-inst-guile (preinstguile): Initialize with
++ $(GUILE_FOR_BUILD) configure parameter.
++
+ 2002-03-03 Rob Browning <[EMAIL PROTECTED]>
+
+ * .cvsignore: add Makefile and Makefile.in.
+diff -purN /home/fred/usr/src/guile-1.5.6/am/pre-inst-guile ./am/pre-inst-guile
+--- /home/fred/usr/src/guile-1.5.6/am/pre-inst-guile Tue Feb 26 12:12:18 2002
++++ ./am/pre-inst-guile Thu Jul 4 03:25:45 2002
+@@ -28,7 +28,7 @@
+
+ ## Code:
+
+-preinstguile = $(top_builddir_absolute)/pre-inst-guile
++preinstguile = $(GUILE_FOR_BUILD)
+ preinstguiletool = GUILE="$(preinstguile)" $(top_srcdir)/scripts
+
+ ## am/pre-inst-guile ends here
+diff -purN /home/fred/usr/src/guile-1.5.6/configure.in ./configure.in
+--- /home/fred/usr/src/guile-1.5.6/configure.in Tue Mar 5 00:24:38 2002
++++ ./configure.in Thu Jul 4 04:05:56 2002
+@@ -20,7 +20,7 @@ dnl along with GUILE; see the file COPY
+ dnl Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ dnl Boston, MA 02111-1307, USA.
+
+-AC_PREREQ(2.50)
++AC_PREREQ(2.53)
+
+ AC_INIT
+ AC_CONFIG_SRCDIR([Makefile.in])
+@@ -51,22 +51,26 @@ AC_ARG_ENABLE(error-on-warning,
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-error-on-warning) ;;
+ esac])
+
++
+ AC_ARG_ENABLE(debug-freelist,
+ [ --enable-debug-freelist include garbage collector freelist debugging code],
+ if test "$enable_debug_freelist" = y || test "$enable_debug_freelist" = yes; then
+- AC_DEFINE(GUILE_DEBUG_FREELIST)
++ AC_DEFINE(GUILE_DEBUG_FREELIST, 1,
++ [Define this if you want to debug the free list (helps w/ GC bugs).])
+ fi)
+
+ AC_ARG_ENABLE(debug-malloc,
+ [ --enable-debug-malloc include malloc debugging code],
+ if test "$enable_debug_malloc" = y || test "$enable_debug_malloc" = yes; then
+- AC_DEFINE(GUILE_DEBUG_MALLOC)
++ AC_DEFINE(GUILE_DEBUG_MALLOC, 1,
++ [Define this if you want to debug scm_must_malloc/realloc/free calls.])
+ fi)
+
+ AC_ARG_ENABLE(guile-debug,
+ [ --enable-guile-debug include internal debugging functions],
+ if test "$enable_guile_debug" = y || test "$enable_guile_debug" = yes; then
+- AC_DEFINE(GUILE_DEBUG)
++ AC_DEFINE(GUILE_DEBUG, 1,
++ [Define this to include various undocumented functions used to debug.])
+ fi)
+
+ AC_ARG_ENABLE(arrays,
+@@ -110,6 +114,10 @@ AM_CONDITIONAL(HTMLDOC, test x$htmldoc_e
+ AC_ARG_ENABLE(deprecated,
+ [ --disable-deprecated omit deprecated features [no]])
+
++
++AH_TEMPLATE([SCM_DEBUG_DEPRECATED],
++ [Define this if you want to exclude deprecated features.])
++
+ if test "$enable_deprecated" = no; then
+ AC_DEFINE(SCM_DEBUG_DEPRECATED, 1)
+ else
+@@ -121,34 +129,17 @@ else
+ warn_default=$enable_deprecated
+ fi
+ AC_DEFINE(SCM_DEBUG_DEPRECATED, 0)
+- AC_DEFINE_UNQUOTED(SCM_WARN_DEPRECATED_DEFAULT, "$warn_default")
++ AC_DEFINE_UNQUOTED(SCM_WARN_DEPRECATED_DEFAULT, "$warn_default",
++ [Define this to control the default warning level for deprecated features.])
+ fi
+
+ dnl The --disable-debug used to control these two. But now they are
+ dnl a required part of the distribution.
+-AC_DEFINE(DEBUG_EXTENSIONS)
+-AC_DEFINE(READER_EXTENSIONS)
++AC_DEFINE(DEBUG_EXTENSIONS, 1,
++ [Define if you want support for debugging Scheme programs.])
++AC_DEFINE(READER_EXTENSIONS, 1,
++ [Define if you want support for debugging Scheme programs.])
+
+-dnl files which are destined for separate modules.
+-
+-if test "$enable_arrays" = yes; then
+- LIBOBJS="$LIBOBJS ramap.o unif.o"
+- AC_DEFINE(HAVE_ARRAYS)
+-fi
+-
+-if test "$enable_posix" = yes; then
+- LIBOBJS="$LIBOBJS filesys.o posix.o"
+- AC_DEFINE(HAVE_POSIX)
+-fi
+-
+-if test "$enable_networking" = yes; then
+- LIBOBJS="$LIBOBJS net_db.o socket.o"
+- AC_DEFINE(HAVE_NETWORKING)
+-fi
+-
+-if test "$enable_debug_malloc" = yes; then
+- LIBOBJS="$LIBOBJS debug-malloc.o"
+-fi
+
+ #--------------------------------------------------------------------
+
+@@ -164,11 +155,42 @@ AC_ISC_POSIX
+ AC_MINIX
+
+ AM_PROG_CC_STDC
++
++## Needed for building DLLs on Cygwin, before AM_PROG_LIBTOOL
++AC_LIBTOOL_WIN32_DLL
+ AM_PROG_LIBTOOL
+
+ AC_CHECK_PROG(have_makeinfo, makeinfo, yes, no)
+ AM_CONDITIONAL(HAVE_MAKEINFO, test "$have_makeinfo" = yes)
+
++dnl files which are destined for separate modules.
++
++if test "$enable_arrays" = yes; then
++ AC_LIBOBJ([ramap])
++ AC_LIBOBJ([unif])
++ AC_DEFINE(HAVE_ARRAYS, 1,
++ [Define this if you want support for arrays and uniform arrays.])
++fi
++
++if test "$enable_posix" = yes; then
++ AC_LIBOBJ([filesys])
++ AC_LIBOBJ([posix])
++ AC_DEFINE(HAVE_POSIX, 1,
++ [Define this if you want support for POSIX system calls in Guile.])
++fi
++
++if test "$enable_networking" = yes; then
++ AC_LIBOBJ([net_db])
++ AC_LIBOBJ([socket])
++ AC_DEFINE(HAVE_NETWORKING, 1,
++ [Define this if you want support for networking in Guile.])
++fi
++
++if test "$enable_debug_malloc" = yes; then
++ AC_LIBOBJ([debug-malloc])
++fi
++
++
+ AC_C_CONST
+ AC_C_INLINE
+ AC_C_BIGENDIAN
+@@ -190,7 +212,7 @@ AC_CACHE_CHECK([for long longs], scm_cv_
+ scm_cv_long_longs=yes,
+ scm_cv_long_longs=no))
+ if test "$scm_cv_long_longs" = yes; then
+- AC_DEFINE(HAVE_LONG_LONGS)
++ AC_DEFINE(HAVE_LONG_LONGS, 1, [Define if the compiler supports long longs.])
+ AC_CHECK_SIZEOF(long long)
+ fi
+
+@@ -230,7 +252,8 @@ use_modules="$withval")
+ test -z "$use_modules" && use_modules=yes
+ DLPREOPEN=
+ if test "$use_modules" != no; then
+- AC_DEFINE(DYNAMIC_LINKING)
++ AC_DEFINE(DYNAMIC_LINKING, 1,
++ [Define if you want support for dynamic linking.])
+ if test "$use_modules" = yes; then
+ DLPREOPEN="-dlpreopen force"
+ else
+@@ -263,7 +286,8 @@ AC_DEFUN(GUILE_FUNC_DECLARED, [
+ guile_cv_func_$1_declared=yes,
+ guile_cv_func_$1_declared=no))
+ if test [x$guile_cv_func_]$1[_declared] = xno; then
+- AC_DEFINE([MISSING_]translit($1, [a-z], [A-Z])[_DECL])
++ AC_DEFINE([MISSING_]translit($1, [a-z], [A-Z])[_DECL], 1,
++ [Define if the operating system supplies $1 without declaring it.])
+ fi
+ ])
+
+@@ -280,13 +304,15 @@ AC_CACHE_CHECK([return type of usleep],
+ [guile_cv_func_usleep_return_type=int])])
+ case "$guile_cv_func_usleep_return_type" in
+ "void" )
+- AC_DEFINE(USLEEP_RETURNS_VOID)
++ AC_DEFINE(USLEEP_RETURNS_VOID, 1,
++ [Define if the system headers declare usleep to return void.])
+ ;;
+ esac
+
+ AC_CHECK_HEADER(sys/un.h, have_sys_un_h=1)
+ if test -n "$have_sys_un_h" ; then
+-AC_DEFINE(HAVE_UNIX_DOMAIN_SOCKETS)
++ AC_DEFINE(HAVE_UNIX_DOMAIN_SOCKETS, 1,
++ [Define if the system supports Unix-domain (file-domain) sockets.])
+ fi
+
+ AC_CHECK_FUNCS(socketpair getgroups setpwent pause tzset)
+@@ -309,7 +335,7 @@ AC_CACHE_VAL(guile_cv_have_h_errno,
+ guile_cv_have_h_errno=yes, guile_cv_have_h_errno=no)])
+ AC_MSG_RESULT($guile_cv_have_h_errno)
+ if test $guile_cv_have_h_errno = yes; then
+- AC_DEFINE(HAVE_H_ERRNO)
++ AC_DEFINE(HAVE_H_ERRNO, 1, [Define if h_errno is declared in netdb.h.])
+ fi
+
+ AC_MSG_CHECKING(whether uint32_t is defined)
+@@ -320,29 +346,39 @@ AC_CACHE_VAL(guile_cv_have_uint32_t,
+ guile_cv_have_uint32_t=yes, guile_cv_have_uint32_t=no)])
+ AC_MSG_RESULT($guile_cv_have_uint32_t)
+ if test $guile_cv_have_uint32_t = yes; then
+- AC_DEFINE(HAVE_UINT32_T)
++ AC_DEFINE(HAVE_UINT32_T, 1,
++ [Define if uint32_t typedef is defined when netdb.h is include.])
+ fi
+
+ AC_MSG_CHECKING(for working IPv6 support)
+ AC_CACHE_VAL(guile_cv_have_ipv6,
+-[AC_TRY_COMPILE([#include <netinet/in.h>
++[AC_TRY_COMPILE([
++#ifdef HAVE_SYS_TYPES_H
++#include <sys/types.h>
++#endif
++#include <netinet/in.h>
+ #include <sys/socket.h>],
+ [struct sockaddr_in6 a; a.sin6_family = AF_INET6;],
+ guile_cv_have_ipv6=yes, guile_cv_have_ipv6=no)])
+ AC_MSG_RESULT($guile_cv_have_ipv6)
+ if test $guile_cv_have_ipv6 = yes; then
+- AC_DEFINE(HAVE_IPV6)
++ AC_DEFINE(HAVE_IPV6, 1, [Define if you want support for IPv6.])
+ fi
+
+ # included in rfc2553 but not in older implementations, e.g., glibc 2.1.3.
+ AC_MSG_CHECKING(whether sockaddr_in6 has sin6_scope_id)
+ AC_CACHE_VAL(guile_cv_have_sin6_scope_id,
+-[AC_TRY_COMPILE([#include <netinet/in.h>],
++[AC_TRY_COMPILE([
++#ifdef HAVE_SYS_TYPES_H
++#include <sys/types.h>
++#endif
++#include <netinet/in.h>],
+ [struct sockaddr_in6 sok; sok.sin6_scope_id = 0;],
+ guile_cv_have_sin6_scope_id=yes, guile_cv_have_sin6_scope_id=no)])
+ AC_MSG_RESULT($guile_cv_have_sin6_scope_id)
+ if test $guile_cv_have_sin6_scope_id = yes; then
+- AC_DEFINE(HAVE_SIN6_SCOPE_ID)
++ AC_DEFINE(HAVE_SIN6_SCOPE_ID, 1,
++ [Define this if your IPv6 has sin6_scope_id in sockaddr_in6 struct.])
+ fi
+
+ AC_MSG_CHECKING(whether localtime caches TZ)
+@@ -389,7 +425,7 @@ else
+ fi])dnl
+ AC_MSG_RESULT($guile_cv_localtime_cache)
+ if test $guile_cv_localtime_cache = yes; then
+- AC_DEFINE(LOCALTIME_CACHE)
++ AC_DEFINE(LOCALTIME_CACHE, 1, [Define if localtime caches the TZ setting.])
+ fi
+
+ dnl Test whether system calls are restartable by default on the
+@@ -408,15 +444,15 @@ if test "$enable_regex" = yes; then
+ if test "$ac_cv_header_regex_h" = yes ||
+ test "$ac_cv_header_rxposix_h" = yes ||
+ test "$ac_cv_header_rx_rxposix_h" = yes; then
+- GUILE_NAMED_CHECK_FUNC(regcomp, norx, [LIBOBJS="regex-posix.o $LIBOBJS"],
+- [AC_CHECK_LIB(rx, main)
+- GUILE_NAMED_CHECK_FUNC(regcomp, rx, [LIBOBJS="regex-posix.o $LIBOBJS"])]
+- )
++ GUILE_NAMED_CHECK_FUNC(regcomp, norx, [AC_LIBOBJ([regex-posix])],
++ [AC_CHECK_LIB(rx, main)
++ GUILE_NAMED_CHECK_FUNC(regcomp, rx, [AC_LIBOBJ([regex-posix])])])
+ dnl The following should not be necessary, but for some reason
+ dnl autoheader misses it if we don't include it!
+ if test "$ac_cv_func_regcomp_norx" = yes ||
+ test "$ac_cv_func_regcomp_rx" = yes; then
+- AC_DEFINE(HAVE_REGCOMP)
++ AC_DEFINE(HAVE_REGCOMP, 1,
++ [This is included as part of a workaround for a autoheader bug.])
+ fi
+ fi
+ fi
+@@ -427,7 +463,7 @@ AC_REPLACE_FUNCS(inet_aton putenv strerr
+ # explicitly to LIBOBJS to make sure that it is translated to
+ # `alloca.lo' for libtool later on. This can and should be done more cleanly.
+ AC_FUNC_ALLOCA
+-if test "$ALLOCA" = "alloca.o"; then LIBOBJS="alloca.o $LIBOBJS"; fi
++if test "$ALLOCA" = "alloca.o"; then AC_LIBOBJ([alloca]); fi
+
+ AC_CHECK_MEMBERS([struct stat.st_rdev])
+ AC_CHECK_MEMBERS([struct stat.st_blksize])
+@@ -442,7 +478,8 @@ AC_CACHE_CHECK([for S_ISLNK in sys/stat.
+ ac_cv_macro_S_ISLNK=yes,
+ ac_cv_macro_S_ISLNK=no)])
+ if test $ac_cv_macro_S_ISLNK = yes; then
+- AC_DEFINE(HAVE_S_ISLNK)
++ AC_DEFINE(HAVE_S_ISLNK, 1,
++ [Define this if your system defines S_ISLNK in sys/stat.h.])
+ fi
+
+ AC_STRUCT_TIMEZONE
+@@ -457,7 +494,16 @@ GUILE_STRUCT_UTIMBUF
+ 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_DEFINE([SCM_STACK_GROWS_UP], 1,
++ [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.])],
++ [],
++ [AC_MSG_WARN(Guessing that stack grows down -- see scmconfig.h.in)])
++
++
++AH_TEMPLATE([SCM_SINGLES],
++ [Define this if floats are the same size as longs.])
+
+ AC_CACHE_CHECK([whether floats fit in longs], guile_cv_type_float_fits_long,
+ [AC_TRY_RUN([main () { exit (sizeof(float) > sizeof(long)); }],
+@@ -486,7 +532,9 @@ AC_CACHE_VAL(scm_cv_struct_linger,
+ 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)
++ AC_DEFINE([HAVE_STRUCT_LINGER], 1,
++ [Define this if your system defines struct linger, for use with the
++ getsockopt and setsockopt system calls.])
+ fi
+
+
+@@ -499,7 +547,8 @@ AC_CACHE_VAL(scm_cv_struct_timespec,
+ scm_cv_struct_timespec="no"))
+ AC_MSG_RESULT($scm_cv_struct_timespec)
+ if test $scm_cv_struct_timespec = yes; then
+- AC_DEFINE(HAVE_STRUCT_TIMESPEC)
++ AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1,
++ [Define this if your system defines struct timespec via <time.h>.])
+ fi
+
+ #--------------------------------------------------------------------
+@@ -541,15 +590,16 @@ esac
+ ## If we're using threads, bring in some other parts of Guile which
+ ## work with them.
+ if test "${THREAD_PACKAGE}" != "" ; then
+- AC_DEFINE(USE_THREADS, 1)
++ AC_DEFINE(USE_THREADS, 1, [Define if using any sort of threads.])
+
+ ## Include the Guile thread interface in the library...
+- LIBOBJS="$LIBOBJS threads.o"
++ AC_LIBOBJ([threads])
+
+ ## ... and tell it which package to talk to.
+ case "${THREAD_PACKAGE}" in
+ "QT" )
+- AC_DEFINE(USE_COOP_THREADS, 1)
++ AC_DEFINE(USE_COOP_THREADS, 1,
++ [Define if using cooperative multithreading.])
+ ;;
+ * )
+ AC_MSG_ERROR(invalid value for THREAD_PACKAGE: ${THREAD_PACKAGE})
+@@ -559,7 +609,7 @@ if test "${THREAD_PACKAGE}" != "" ; then
+ ## Bring in scm_internal_select, if appropriate.
+ if test $ac_cv_func_gettimeofday = yes &&
+ test $ac_cv_func_select = yes; then
+- AC_DEFINE(GUILE_ISELECT, 1)
++ AC_DEFINE(GUILE_ISELECT, 1, [Define to implement scm_internal_select.])
+ fi
+
+ AC_ARG_ENABLE(linuxthreads,
+@@ -568,11 +618,60 @@ if test "${THREAD_PACKAGE}" != "" ; then
+
+ ## Workaround for linuxthreads (optionally disabled)
+ if test $host_os = linux-gnu -a "$enable_linuxthreads" = yes; then
+- AC_DEFINE(GUILE_PTHREAD_COMPAT, 1)
++ AC_DEFINE(GUILE_PTHREAD_COMPAT, 1,
++ [Define to enable workaround for COOP-linuxthreads compatibility.])
+ AC_CHECK_LIB(pthread, main)
+ fi
+ fi
+
++## Cross building
++if test "$cross_compiling" = "yes"; then
++ AC_MSG_CHECKING(cc for build)
++ ## /usr/bin/cc still uses wrong assembler
++ ## CC_FOR_BUILD="${CC_FOR_BUILD-/usr/bincc}"
++ CC_FOR_BUILD="${CC_FOR_BUILD-PATH=/usr/bin:$PATH cc}"
++else
++ CC_FOR_BUILD="${CC_FOR_BUILD-$CC}"
++fi
++AC_ARG_WITH(cc-for-build,
++ [ --with-cc-for-build=CC native C compiler, to be used during build])
++test -n "$with_cc_for_build" && CC_FOR_BUILD="$with_cc_for_build"
++
++## AC_MSG_CHECKING("if we are cross compiling")
++## AC_MSG_RESULT($cross_compiling)
++if test "$cross_compiling" = "yes"; then
++ AC_MSG_RESULT($CC_FOR_BUILD)
++fi
++
++## No need as yet to be more elaborate
++CCLD_FOR_BUILD="$CC_FOR_BUILD"
++
++AC_SUBST(cross_compiling)
++AC_SUBST(CC_FOR_BUILD)
++AC_SUBST(CCLD_FOR_BUILD)
++
++## libtool erroneously calls CC_FOR_BUILD HOST_CC;
++## --HOST is the platform that PACKAGE is compiled for.
++HOST_CC="$CC_FOR_BUILD"
++AC_SUBST(HOST_CC)
++
++if test "$cross_compiling" = "yes"; then
++ AC_MSG_CHECKING(guile for build)
++ GUILE_FOR_BUILD="${GUILE_FOR_BUILD-guile}"
++else
++ GUILE_FOR_BUILD='$(top_builddir_absolute)/pre-inst-guile'
++fi
++AC_ARG_WITH(guile-for-build,
++ [ --with-guile-for-build=CC native guile executable, to be used during build])
++test -n "$with_guile_for_build" && GUILE_FOR_BUILD="$with_cc_for_build"
++
++## AC_MSG_CHECKING("if we are cross compiling")
++## AC_MSG_RESULT($cross_compiling)
++if test "$cross_compiling" = "yes"; then
++ AC_MSG_RESULT($GUILE_FOR_BUILD)
++fi
++AC_SUBST(GUILE_FOR_BUILD)
++
+ ## If we're using GCC, ask for aggressive warnings.
+ case "$GCC" in
+ yes )
+@@ -589,11 +688,11 @@ 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'`"
++LIBLOBJS="`echo ${LIB@&t@OBJS} | sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`"
+
+ ## We also need to create corresponding .doc and .x files
+-EXTRA_DOT_DOC_FILES="`echo ${LIBOBJS} | sed 's/\.o/.doc/g'`"
+-EXTRA_DOT_X_FILES="`echo ${LIBOBJS} | sed 's/\.o/.x/g'`"
++EXTRA_DOT_DOC_FILES="`echo ${LIB@&t@OBJS} | sed 's,\.[[^.]]* ,.doc
+,g;s,\.[[^.]]*$,.doc,'`"
++EXTRA_DOT_X_FILES="`echo ${LIB@&t@OBJS} | sed 's,\.[[^.]]* ,.x ,g;s,\.[[^.]]*$,.x,'`"
+
+ AC_SUBST(GUILE_MAJOR_VERSION)
+ AC_SUBST(GUILE_MINOR_VERSION)
+@@ -617,11 +716,13 @@ AC_SUBST(LIBGUILE_SRFI_SRFI_4_INTERFACE_
+ AC_SUBST(LIBGUILE_SRFI_SRFI_4_INTERFACE_REVISION)
+ AC_SUBST(LIBGUILE_SRFI_SRFI_4_INTERFACE_AGE)
+ AC_SUBST(LIBGUILE_SRFI_SRFI_4_INTERFACE)
++AC_SUBST(LIBGUILE_SRFI_SRFI_4_LTHACK)
+
+ AC_SUBST(LIBGUILE_SRFI_SRFI_13_14_INTERFACE_CURRENT)
+ AC_SUBST(LIBGUILE_SRFI_SRFI_13_14_INTERFACE_REVISION)
+ AC_SUBST(LIBGUILE_SRFI_SRFI_13_14_INTERFACE_AGE)
+ AC_SUBST(LIBGUILE_SRFI_SRFI_13_14_INTERFACE)
++AC_SUBST(LIBGUILE_SRFI_SRFI_13_14_LTHACK)
+
+ #######################################################################
+
+diff -purN /home/fred/usr/src/guile-1.5.6/doc/guile.1 ./doc/guile.1
+--- /home/fred/usr/src/guile-1.5.6/doc/guile.1 Thu Jan 1 01:00:00 1970
++++ ./doc/guile.1 Fri Jul 5 02:01:58 2002
+@@ -0,0 +1,93 @@
++.\" Written by Robert Merkel ([EMAIL PROTECTED])
++.\" augmented by Rob Browning <[EMAIL PROTECTED]>
++.\" Process this file with
++.\" groff -man -Tascii foo.1
++.\"
++.TH GUILE 1 "January 2001" Version "1.4"
++.SH NAME
++guile \- a Scheme interpreter
++.SH SYNOPSIS
++.B guile [-q] [-ds] [--help] [--version] [--emacs] [--debug]
++.B [-l FILE] [-e FUNCTION] [\]
++.B [-c EXPR] [-s SCRIPT] [--]
++.SH DESCRIPTION
++Guile is an interpreter for the Scheme programming language. It
++implements a superset of R4RS, providing the additional features
++necessary for real-world use. It is extremely simple to embed guile
++into a C program, calling C from Scheme and Scheme from C. Guile's
++design makes it very suitable for use as an "extension" or "glue"
++language, but it also works well as a stand-alone scheme development
++environment.
++
++The
++.B guile
++executable itself provides a stand-alone interpreter for scheme
++programs, for either interactive use or executing scripts.
++
++This manpage provides only brief instruction in invoking
++.B guile
++from the command line. Please consult the guile info documentation
++(type
++.B info guile
++at a command prompt) for more information. There is also a tutorial
++.B (info guile-tut)
++available.
++
++.SH OPTIONS
++.IP -l FILE
++Load scheme source code from file.
++.IP -e FUNCTION
++After reading script, apply FUNCTION to command-line arguments
++.IP -ds
++do -s SCRIPT at this point (note that this argument must be used in
++conjuction with -s)
++.IP --help
++Describe command line options and exit
++.IP --debug
++Start guile with debugging evaluator and backtraces enabled
++(useful for debugging guile scripts)
++.IP --version
++Display guile version and exit.
++.IP --emacs
++Enable emacs protocol for use from within emacs (experimental)
++.IP --
++Stop argument processing, start guile in interactive mode.
++.IP -c EXPR
++Stop argument processing, evaluate EXPR as a scheme expression.
++.IP -s SCRIPT-FILE
++Load Scheme source from SCRIPT-FILE and execute as a script.
++
++.SH ENVIRONMENT
++.\".TP \w'MANROFFSEQ\ \ 'u
++.TP
++.B GUILE_LOAD_PATH
++If
++.RB $ GUILE_LOAD_PATH
++is set, its value is used to agument the path to search for scheme
++files when loading. It should be a colon separated list of
++directories which will be prepended to the default %load-path.
++
++.SH FILES
++.I ~/.guile
++is a guile script that is executed before any other processing occurs.
++For example, the following .guile activates guile's readline
++interface:
++
++.RS 4
++(use-modules (ice-9 readline))
++.RS 0
++(activate-readline)
++
++.SH "SEE ALSO"
++.B info guile, info guile-tut
++
++http://www.schemers.org provides a general introduction to the
++Scheme language.
++
++.SH AUTHORS
++Robert Merkel <[EMAIL PROTECTED]> wrote this manpage.
++Rob Browning <[EMAIL PROTECTED]> has added to it.
++
++.B guile
++is GNU software. Guile is originally based on Aubrey Jaffer's
++SCM interpreter, and is the work of many individuals.
+diff -purN /home/fred/usr/src/guile-1.5.6/libguile/ChangeLog ./libguile/ChangeLog
+--- /home/fred/usr/src/guile-1.5.6/libguile/ChangeLog Sun Mar 3 02:14:37 2002
++++ ./libguile/ChangeLog Thu Jul 4 03:27:54 2002
+@@ -1,3 +1,14 @@
++2002-07-03 Jan Nieuwenhuizen <[EMAIL PROTECTED]>
++
++ * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
++ this should be compiled for BUILD host.
++ Override default rule for
++ guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
++ Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
++
++ * guile.c, iselect.h, net_db.c, posix.c, socket.c: Cygwin compile
++ fixes.
++
+ 2002-03-01 Dirk Herrmann <[EMAIL PROTECTED]>
+
+ * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, DOUBLECELL_ALIGNED_P,
+diff -purN /home/fred/usr/src/guile-1.5.6/libguile/Makefile.am ./libguile/Makefile.am
+--- /home/fred/usr/src/guile-1.5.6/libguile/Makefile.am Fri Mar 1 19:19:36
+2002
++++ ./libguile/Makefile.am Thu Jul 4 03:27:23 2002
+@@ -33,14 +33,33 @@ ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\
+
+ lib_LTLIBRARIES = libguile.la
+ bin_PROGRAMS = guile
++
+ noinst_PROGRAMS = guile_filter_doc_snarfage
++guile_filter_doc_snarfage_SOURCES = c-tokenize.c
++
++## Override default rule; this should be compiled for BUILD host.
++## For some reason, OBJEXT does not include the dot
++c-tokenize.$(OBJEXT): c-tokenize.c
++ if [ "$(cross_compiling)" = "yes" ]; then \
++ $(CC_FOR_BUILD) -c -o $@ $<; \
++ else \
++ $(COMPILE) -c -o $@ $<; \
++ fi
++
++## Override default rule; this should run on BUILD host.
++guile_filter_doc_snarfage$(EXEEXT): $(guile_filter_doc_snarfage_OBJECTS)
+$(guile_filter_doc_snarfage_DEPENDENCIES)
++ @rm -f guile_filter_doc_snarfage$(EXEEXT)
++ if [ "$(cross_compiling)" = "yes" ]; then \
++ $(CCLD_FOR_BUILD) -o $@ $(guile_filter_doc_snarfage_OBJECTS); \
++ else \
++ $(LINK) $(guile_filter_doc_snarfage_OBJECTS) $(LDADD) $(LIBS); \
++ fi
++
+
+ guile_SOURCES = guile.c
+ guile_LDADD = libguile.la
+ guile_LDFLAGS = @DLPREOPEN@
+
+-guile_filter_doc_snarfage_SOURCES = c-tokenize.c
+-
+ libguile_la_SOURCES = alist.c arbiters.c async.c backtrace.c boolean.c \
+ chars.c continuations.c debug.c deprecation.c dynl.c dynwind.c \
+ environments.c eq.c error.c eval.c evalext.c extensions.c \
+@@ -195,7 +214,7 @@ SUFFIXES = .x .doc
+ .c.doc:
+ -(test -n "${AWK+set}" || AWK="@AWK@"; ${AWK} -f ./guile-func-name-check $<)
+ (./guile-snarf-docs $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< | \
+- ./guile_filter_doc_snarfage --filter-snarfage) > $@ || { rm $@; false; }
++ ./guile_filter_doc_snarfage$(EXEEXT) --filter-snarfage) > $@ || { rm $@;
+false; }
+
+ $(DOT_X_FILES) $(EXTRA_DOT_DOC_FILES): snarf.h guile-snarf.in
+
+diff -purN /home/fred/usr/src/guile-1.5.6/libguile/guile.c ./libguile/guile.c
+--- /home/fred/usr/src/guile-1.5.6/libguile/guile.c Wed Jun 27 21:30:20 2001
++++ ./libguile/guile.c Thu Jul 4 03:25:46 2002
+@@ -55,7 +55,8 @@
+ #include <libltdl/ltdl.h>
+ #endif
+
+-#ifdef HAVE_WINSOCK2_H
++#if defined (HAVE_WINSOCK2_H) \
++ && !(defined (__CYGWIN32__) || defined (__CYGWIN__))
+ #include <winsock2.h>
+ #endif
+
+diff -purN /home/fred/usr/src/guile-1.5.6/libguile/iselect.h ./libguile/iselect.h
+--- /home/fred/usr/src/guile-1.5.6/libguile/iselect.h Mon Jul 23 22:48:44 2001
++++ ./libguile/iselect.h Thu Jul 4 03:25:46 2002
+@@ -67,7 +67,8 @@
+ #include <sys/select.h>
+ #endif
+
+-#ifdef HAVE_WINSOCK2_H
++#if defined (HAVE_WINSOCK2_H) \
++ && !(defined (__CYGWIN32__) || defined (__CYGWIN__))
+ #include <winsock2.h>
+ #endif
+
+diff -purN /home/fred/usr/src/guile-1.5.6/libguile/net_db.c ./libguile/net_db.c
+--- /home/fred/usr/src/guile-1.5.6/libguile/net_db.c Mon Jul 9 16:24:40 2001
++++ ./libguile/net_db.c Thu Jul 4 03:25:46 2002
+@@ -65,7 +65,8 @@
+
+ #include <sys/types.h>
+
+-#ifdef HAVE_WINSOCK2_H
++#if defined (HAVE_WINSOCK2_H) \
++ && !(defined (__CYGWIN32__) || defined (__CYGWIN__))
+ #include <winsock2.h>
+ #else
+ #include <sys/socket.h>
+diff -purN /home/fred/usr/src/guile-1.5.6/libguile/posix.c ./libguile/posix.c
+--- /home/fred/usr/src/guile-1.5.6/libguile/posix.c Sat Nov 17 20:03:43 2001
++++ ./libguile/posix.c Thu Jul 4 03:25:46 2002
+@@ -95,7 +95,8 @@ extern char *ttyname();
+ #ifdef HAVE_IO_H
+ #include <io.h>
+ #endif
+-#ifdef HAVE_WINSOCK2_H
++#if defined (HAVE_WINSOCK2_H) \
++ && !(defined (__CYGWIN32__) || defined (__CYGWIN__))
+ #include <winsock2.h>
+ #endif
+
+diff -purN /home/fred/usr/src/guile-1.5.6/libguile/socket.c ./libguile/socket.c
+--- /home/fred/usr/src/guile-1.5.6/libguile/socket.c Mon Jul 9 16:24:40 2001
++++ ./libguile/socket.c Thu Jul 4 03:25:46 2002
+@@ -61,7 +61,8 @@
+ #include <unistd.h>
+ #endif
+ #include <sys/types.h>
+-#ifdef HAVE_WINSOCK2_H
++#if defined (HAVE_WINSOCK2_H) \
++ && !(defined (__CYGWIN32__) || defined (__CYGWIN__))
+ #include <winsock2.h>
+ #else
+ #include <sys/socket.h>
+diff -purN /home/fred/usr/src/guile-1.5.6/qt/Makefile.am ./qt/Makefile.am
+--- /home/fred/usr/src/guile-1.5.6/qt/Makefile.am Fri Feb 15 23:11:29 2002
++++ ./qt/Makefile.am Thu Jul 4 03:53:53 2002
+@@ -24,7 +24,7 @@ AUTOMAKE_OPTIONS = gnu
+ ## subdirs are for making distributions only.
+ SUBDIRS = md time
+
+-lib_LTLIBRARIES = @QTHREAD_LTLIBS@
++lib_LTLIBRARIES =
+ EXTRA_LTLIBRARIES = libqthreads.la
+
+ ## Prevent automake from adding extra -I options
+diff -purN /home/fred/usr/src/guile-1.5.6/qt/Makefile.in ./qt/Makefile.in
+--- /home/fred/usr/src/guile-1.5.6/qt/Makefile.in Tue Mar 5 00:43:37 2002
++++ ./qt/Makefile.in Thu Jul 4 04:02:33 2002
+@@ -124,7 +124,7 @@ AUTOMAKE_OPTIONS = gnu
+
+ SUBDIRS = md time
+
+-lib_LTLIBRARIES = @QTHREAD_LTLIBS@
++lib_LTLIBRARIES =
+ EXTRA_LTLIBRARIES = libqthreads.la
+
+ DEFS = @DEFS@
--
Jan Nieuwenhuizen <[EMAIL PROTECTED]> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien | http://www.lilypond.org