]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/windows/guile-1.5.6-1.5.6.jcn2.patch
*** empty log message ***
[lilypond.git] / Documentation / windows / guile-1.5.6-1.5.6.jcn2.patch
1 diff -purN /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/README ./CYGWIN-PATCHES/README
2 --- /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/README        Thu Jan  1 01:00:00 1970
3 +++ ./CYGWIN-PATCHES/README     Thu Jul  4 12:07:01 2002
4 @@ -0,0 +1,59 @@
5 +Guile
6 +------------------------------------------
7 +The GNU extension language and Scheme interpreter.
8 +
9 +Runtime requirements:
10 +  cygwin-1.3.10 or newer
11 +  libguile14
12 +
13 +Build requirements:
14 +  cygwin-1.3.10 or newer
15 +  binutils-20011102 or newer
16 +  gcc-2.95.3-5 or newer
17 +  autoconf CVS (20020703) or newer,
18 +    autoconf-devel-2.53a-1 should be ok.
19 +  automake CVS (20020703) or newer,
20 +    automake-devel-1.6.1-3 should be ok.
21 +  libtool CVS (20020703) or newer,
22 +    libtool-devel-20020502-2 should be ok.
23 +
24 +Canonical homepage:
25 +  http://www.gnu.org/software/guile/
26 +
27 +Canonical download:
28 +  ftp://ftp.gnu.org/pub/gnu/guile/
29 +  
30 +------------------------------------
31 +
32 +Build instructions:
33 +
34 +  unpack guile-1.5.6-1-src.tar.bz2
35 +    if you use setup to install this src package, it will be
36 +        unpacked under /usr/src automatically
37 +  cd /usr/src
38 +  DISTDIR=/usr/src ./guile-1.5.6-1.sh
39 +
40 +This will create:
41 +  $DISTDIR/guile/guile-1.5.6-1-orig.tar.bz2
42 +  $DISTDIR/guile/guile-1.5.6-1-src.tar.bz2
43 +  $DISTDIR/guile/guile-1.5.6-1.tar.bz2
44 +  $DISTDIR/guile/guile-doc/guile-doc-1.5.6-1.tar.bz2
45 +  $DISTDIR/guile/libguile14-dev/libguile14-dev-1.5.6-1.tar.bz2
46 +  $DISTDIR/guile/libguile14/libguile14-1.5.6-1.tar.bz2
47 +
48 +------------------
49 +
50 +Port notes:
51 +
52 +  Patches with Cygwin compile fixes and cross building fixes have
53 +  been sent upstream.
54 +
55 +  These packages were built on GNU/Linux using cross building and
56 +  packaging scripts:
57 +
58 +      http://lilypond.org/cygwin/cygwin-cross-1.3.10.2.tar.gz
59 +
60 +  Jan Nieuwenhuizen
61 +  janneke@gnu.org
62 +
63 +Cygwin port maintained by: Jan Nieuwenhuizen  <janneke@gnu.org> 
64 diff -purN /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/changelog ./CYGWIN-PATCHES/changelog
65 --- /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/changelog     Thu Jan  1 01:00:00 1970
66 +++ ./CYGWIN-PATCHES/changelog  Thu Jul  4 11:29:43 2002
67 @@ -0,0 +1,9 @@
68 +guile (1.5.6-1) unstable; urgency=low
69 +
70 +  * Initial Release.
71 +
72 + -- Jan Nieuwenhuizen <janneke@gnu.org>  Thu,  3 Jul 2002 04:28:07 +0200
73 +
74 +Local variables:
75 +mode: debian-changelog
76 +End:
77 diff -purN /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/guile-doc.hint ./CYGWIN-PATCHES/guile-doc.hint
78 --- /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/guile-doc.hint        Thu Jan  1 01:00:00 1970
79 +++ ./CYGWIN-PATCHES/guile-doc.hint     Thu Jul  4 12:19:13 2002
80 @@ -0,0 +1,8 @@
81 +sdesc: "The GNU extension language and Scheme interpreter (documentation)"
82 +category: doc
83 +requires: cygwin
84 +ldesc: "The GNU extension language and Scheme interpreter (documentation)
85 +This package contains the documentation for guile, including both
86 +a reference manual (via `info guile'), and a tutorial (via `info
87 +guile-tut')."
88 +
89 diff -purN /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/guile.hint ./CYGWIN-PATCHES/guile.hint
90 --- /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/guile.hint    Thu Jan  1 01:00:00 1970
91 +++ ./CYGWIN-PATCHES/guile.hint Thu Jul  4 12:11:15 2002
92 @@ -0,0 +1,12 @@
93 +sdesc: "The GNU extension language and Scheme interpreter (executable)"
94 +category: interpreters
95 +requires: cygwin libguile14 
96 +ldesc: "The GNU extension language and Scheme interpreter (executable)
97 +Guile, the GNU Ubiquitous Intelligent Language for Extension, is a scheme
98 +implementation designed for real world programming, supporting a
99 +rich Unix interface, a module system, and undergoing rapid development.
100 +
101 +`guile' is a scheme interpreter that can execute scheme scripts (with a
102 +#! line at the top of the file), or run as an inferior scheme
103 +process inside Emacs."
104 +
105 diff -purN /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/libguile14-dev.hint ./CYGWIN-PATCHES/libguile14-dev.hint
106 --- /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/libguile14-dev.hint   Thu Jan  1 01:00:00 1970
107 +++ ./CYGWIN-PATCHES/libguile14-dev.hint        Thu Jul  4 12:20:28 2002
108 @@ -0,0 +1,8 @@
109 +sdesc: "Development headers and static libraries for Guile."
110 +category: development libs
111 +requires: cygwin
112 +ldesc: "Development headers and static libraries for Guile.
113 +`libguile.h' etc. C headers, aclocal macros, the `guile-snarf' and
114 +`guile-config' utilities, and static `libguile.a' libraries for Guile,
115 +the GNU Ubiquitous Intelligent Language for Extension."
116 +
117 diff -purN /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/libguile14.hint ./CYGWIN-PATCHES/libguile14.hint
118 --- /home/fred/usr/src/guile-1.5.6/CYGWIN-PATCHES/libguile14.hint       Thu Jan  1 01:00:00 1970
119 +++ ./CYGWIN-PATCHES/libguile14.hint    Thu Jul  4 12:17:19 2002
120 @@ -0,0 +1,7 @@
121 +sdesc: "The GNU extension language and Scheme interpreter (runtime libraries)"
122 +category: libs
123 +requires: cygwin
124 +ldesc: "The GNU extension language and Scheme interpreter (runtime libraries)
125 +Guile shared object libraries and the ice-9 scheme module.  Guile is
126 +the GNU Ubiquitous Intelligent Language for Extension."
127 +
128 diff -purN /home/fred/usr/src/guile-1.5.6/am/ChangeLog ./am/ChangeLog
129 --- /home/fred/usr/src/guile-1.5.6/am/ChangeLog Sun Mar  3 21:34:07 2002
130 +++ ./am/ChangeLog      Thu Jul  4 03:28:08 2002
131 @@ -1,3 +1,8 @@
132 +2002-07-03  Jan Nieuwenhuizen  <janneke@gnu.org>
133 +
134 +       * pre-inst-guile (preinstguile): Initialize with
135 +       $(GUILE_FOR_BUILD) configure parameter.
136 +
137  2002-03-03  Rob Browning  <rlb@defaultvalue.org>
138  
139         * .cvsignore: add Makefile and Makefile.in.
140 diff -purN /home/fred/usr/src/guile-1.5.6/am/pre-inst-guile ./am/pre-inst-guile
141 --- /home/fred/usr/src/guile-1.5.6/am/pre-inst-guile    Tue Feb 26 12:12:18 2002
142 +++ ./am/pre-inst-guile Thu Jul  4 03:25:45 2002
143 @@ -28,7 +28,7 @@
144  
145  ## Code:
146  
147 -preinstguile     = $(top_builddir_absolute)/pre-inst-guile
148 +preinstguile     = $(GUILE_FOR_BUILD)
149  preinstguiletool = GUILE="$(preinstguile)" $(top_srcdir)/scripts
150  
151  ## am/pre-inst-guile ends here
152 diff -purN /home/fred/usr/src/guile-1.5.6/configure.in ./configure.in
153 --- /home/fred/usr/src/guile-1.5.6/configure.in Tue Mar  5 00:24:38 2002
154 +++ ./configure.in      Thu Jul  4 04:05:56 2002
155 @@ -20,7 +20,7 @@ dnl  along with GUILE; see the file COPY
156  dnl  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
157  dnl  Boston, MA 02111-1307, USA.
158  
159 -AC_PREREQ(2.50)
160 +AC_PREREQ(2.53)
161  
162  AC_INIT
163  AC_CONFIG_SRCDIR([Makefile.in])
164 @@ -51,22 +51,26 @@ AC_ARG_ENABLE(error-on-warning,
165       *) AC_MSG_ERROR(bad value ${enableval} for --enable-error-on-warning) ;;
166     esac])
167  
168 +
169  AC_ARG_ENABLE(debug-freelist,
170    [  --enable-debug-freelist include garbage collector freelist debugging code],
171    if test "$enable_debug_freelist" = y || test "$enable_debug_freelist" = yes; then
172 -    AC_DEFINE(GUILE_DEBUG_FREELIST)
173 +    AC_DEFINE(GUILE_DEBUG_FREELIST, 1,
174 +      [Define this if you want to debug the free list (helps w/ GC bugs).])
175    fi)
176  
177  AC_ARG_ENABLE(debug-malloc,
178    [  --enable-debug-malloc   include malloc debugging code],
179    if test "$enable_debug_malloc" = y || test "$enable_debug_malloc" = yes; then
180 -    AC_DEFINE(GUILE_DEBUG_MALLOC)
181 +    AC_DEFINE(GUILE_DEBUG_MALLOC, 1,
182 +      [Define this if you want to debug scm_must_malloc/realloc/free calls.])
183    fi)
184  
185  AC_ARG_ENABLE(guile-debug,
186    [  --enable-guile-debug    include internal debugging functions],
187    if test "$enable_guile_debug" = y || test "$enable_guile_debug" = yes; then
188 -    AC_DEFINE(GUILE_DEBUG)
189 +    AC_DEFINE(GUILE_DEBUG, 1,
190 +      [Define this to include various undocumented functions used to debug.])
191    fi)
192  
193  AC_ARG_ENABLE(arrays,
194 @@ -110,6 +114,10 @@ AM_CONDITIONAL(HTMLDOC, test x$htmldoc_e
195  AC_ARG_ENABLE(deprecated,
196    [  --disable-deprecated    omit deprecated features [no]])
197  
198 +
199 +AH_TEMPLATE([SCM_DEBUG_DEPRECATED],
200 +            [Define this if you want to exclude deprecated features.])
201 +
202  if test "$enable_deprecated" = no; then
203    AC_DEFINE(SCM_DEBUG_DEPRECATED, 1)
204  else
205 @@ -121,34 +129,17 @@ else
206      warn_default=$enable_deprecated
207    fi
208    AC_DEFINE(SCM_DEBUG_DEPRECATED, 0)
209 -  AC_DEFINE_UNQUOTED(SCM_WARN_DEPRECATED_DEFAULT, "$warn_default")
210 +  AC_DEFINE_UNQUOTED(SCM_WARN_DEPRECATED_DEFAULT, "$warn_default",
211 +  [Define this to control the default warning level for deprecated features.])
212  fi
213  
214  dnl The --disable-debug used to control these two.  But now they are
215  dnl a required part of the distribution.
216 -AC_DEFINE(DEBUG_EXTENSIONS)
217 -AC_DEFINE(READER_EXTENSIONS)
218 +AC_DEFINE(DEBUG_EXTENSIONS, 1,
219 +  [Define if you want support for debugging Scheme programs.])
220 +AC_DEFINE(READER_EXTENSIONS, 1,
221 +  [Define if you want support for debugging Scheme programs.])
222  
223 -dnl files which are destined for separate modules.
224 -
225 -if test "$enable_arrays" = yes; then
226 -   LIBOBJS="$LIBOBJS ramap.o unif.o"
227 -   AC_DEFINE(HAVE_ARRAYS)
228 -fi
229 -
230 -if test "$enable_posix" = yes; then
231 -   LIBOBJS="$LIBOBJS filesys.o posix.o"
232 -   AC_DEFINE(HAVE_POSIX)
233 -fi
234 -
235 -if test "$enable_networking" = yes; then
236 -   LIBOBJS="$LIBOBJS net_db.o socket.o"
237 -   AC_DEFINE(HAVE_NETWORKING)
238 -fi
239 -
240 -if test "$enable_debug_malloc" = yes; then
241 -   LIBOBJS="$LIBOBJS debug-malloc.o"
242 -fi
243  
244  #--------------------------------------------------------------------
245  
246 @@ -164,11 +155,42 @@ AC_ISC_POSIX
247  AC_MINIX
248  
249  AM_PROG_CC_STDC
250 +
251 +## Needed for building DLLs on Cygwin, before AM_PROG_LIBTOOL
252 +AC_LIBTOOL_WIN32_DLL
253  AM_PROG_LIBTOOL
254  
255  AC_CHECK_PROG(have_makeinfo, makeinfo, yes, no)
256  AM_CONDITIONAL(HAVE_MAKEINFO, test "$have_makeinfo" = yes)
257  
258 +dnl files which are destined for separate modules.
259 +
260 +if test "$enable_arrays" = yes; then
261 +   AC_LIBOBJ([ramap])
262 +   AC_LIBOBJ([unif])
263 +   AC_DEFINE(HAVE_ARRAYS, 1,
264 +     [Define this if you want support for arrays and uniform arrays.])
265 +fi
266 +
267 +if test "$enable_posix" = yes; then
268 +   AC_LIBOBJ([filesys])
269 +   AC_LIBOBJ([posix])
270 +   AC_DEFINE(HAVE_POSIX, 1,
271 +     [Define this if you want support for POSIX system calls in Guile.])
272 +fi
273 +
274 +if test "$enable_networking" = yes; then
275 +   AC_LIBOBJ([net_db])
276 +   AC_LIBOBJ([socket])
277 +   AC_DEFINE(HAVE_NETWORKING, 1,
278 +     [Define this if you want support for networking in Guile.])
279 +fi
280 +
281 +if test "$enable_debug_malloc" = yes; then
282 +   AC_LIBOBJ([debug-malloc])
283 +fi
284 +
285 +
286  AC_C_CONST
287  AC_C_INLINE
288  AC_C_BIGENDIAN
289 @@ -190,7 +212,7 @@ AC_CACHE_CHECK([for long longs], scm_cv_
290                               scm_cv_long_longs=yes,
291                               scm_cv_long_longs=no))
292  if test "$scm_cv_long_longs" = yes; then
293 -  AC_DEFINE(HAVE_LONG_LONGS)
294 +  AC_DEFINE(HAVE_LONG_LONGS, 1, [Define if the compiler supports long longs.])
295    AC_CHECK_SIZEOF(long long)
296  fi
297  
298 @@ -230,7 +252,8 @@ use_modules="$withval")
299  test -z "$use_modules" && use_modules=yes
300  DLPREOPEN=
301  if test "$use_modules" != no; then
302 -  AC_DEFINE(DYNAMIC_LINKING)
303 +  AC_DEFINE(DYNAMIC_LINKING, 1,
304 +    [Define if you want support for dynamic linking.])
305    if test "$use_modules" = yes; then
306      DLPREOPEN="-dlpreopen force"
307    else
308 @@ -263,7 +286,8 @@ AC_DEFUN(GUILE_FUNC_DECLARED, [
309                     guile_cv_func_$1_declared=yes,
310                     guile_cv_func_$1_declared=no))
311    if test [x$guile_cv_func_]$1[_declared] = xno; then
312 -    AC_DEFINE([MISSING_]translit($1, [a-z], [A-Z])[_DECL])
313 +    AC_DEFINE([MISSING_]translit($1, [a-z], [A-Z])[_DECL], 1,
314 +      [Define if the operating system supplies $1 without declaring it.])
315    fi
316  ])
317  
318 @@ -280,13 +304,15 @@ AC_CACHE_CHECK([return type of usleep], 
319                    [guile_cv_func_usleep_return_type=int])])
320  case "$guile_cv_func_usleep_return_type" in
321    "void" )
322 -    AC_DEFINE(USLEEP_RETURNS_VOID)
323 +    AC_DEFINE(USLEEP_RETURNS_VOID, 1,
324 +      [Define if the system headers declare usleep to return void.])
325    ;;
326  esac
327  
328  AC_CHECK_HEADER(sys/un.h, have_sys_un_h=1)
329  if test -n "$have_sys_un_h" ; then
330 -AC_DEFINE(HAVE_UNIX_DOMAIN_SOCKETS)
331 +  AC_DEFINE(HAVE_UNIX_DOMAIN_SOCKETS, 1,
332 +    [Define if the system supports Unix-domain (file-domain) sockets.])
333  fi
334  
335  AC_CHECK_FUNCS(socketpair getgroups setpwent pause tzset)
336 @@ -309,7 +335,7 @@ AC_CACHE_VAL(guile_cv_have_h_errno,
337  guile_cv_have_h_errno=yes, guile_cv_have_h_errno=no)])
338  AC_MSG_RESULT($guile_cv_have_h_errno)
339  if test $guile_cv_have_h_errno = yes; then
340 -  AC_DEFINE(HAVE_H_ERRNO)
341 +  AC_DEFINE(HAVE_H_ERRNO, 1, [Define if h_errno is declared in netdb.h.])
342  fi
343  
344  AC_MSG_CHECKING(whether uint32_t is defined)
345 @@ -320,29 +346,39 @@ AC_CACHE_VAL(guile_cv_have_uint32_t,
346                   guile_cv_have_uint32_t=yes, guile_cv_have_uint32_t=no)])
347  AC_MSG_RESULT($guile_cv_have_uint32_t)
348  if test $guile_cv_have_uint32_t = yes; then
349 -  AC_DEFINE(HAVE_UINT32_T)
350 +  AC_DEFINE(HAVE_UINT32_T, 1,
351 +    [Define if uint32_t typedef is defined when netdb.h is include.])
352  fi
353  
354  AC_MSG_CHECKING(for working IPv6 support)
355  AC_CACHE_VAL(guile_cv_have_ipv6,
356 -[AC_TRY_COMPILE([#include <netinet/in.h>
357 +[AC_TRY_COMPILE([
358 +#ifdef HAVE_SYS_TYPES_H
359 +#include <sys/types.h>
360 +#endif
361 +#include <netinet/in.h>
362  #include <sys/socket.h>],
363  [struct sockaddr_in6 a;  a.sin6_family = AF_INET6;],
364  guile_cv_have_ipv6=yes, guile_cv_have_ipv6=no)])
365  AC_MSG_RESULT($guile_cv_have_ipv6)
366  if test $guile_cv_have_ipv6 = yes; then
367 -  AC_DEFINE(HAVE_IPV6)
368 +  AC_DEFINE(HAVE_IPV6, 1, [Define if you want support for IPv6.])
369  fi
370  
371  # included in rfc2553 but not in older implementations, e.g., glibc 2.1.3.
372  AC_MSG_CHECKING(whether sockaddr_in6 has sin6_scope_id)
373  AC_CACHE_VAL(guile_cv_have_sin6_scope_id,
374 -[AC_TRY_COMPILE([#include <netinet/in.h>],
375 +[AC_TRY_COMPILE([
376 +#ifdef HAVE_SYS_TYPES_H
377 +#include <sys/types.h>
378 +#endif
379 +#include <netinet/in.h>],
380  [struct sockaddr_in6 sok;  sok.sin6_scope_id = 0;],
381  guile_cv_have_sin6_scope_id=yes, guile_cv_have_sin6_scope_id=no)])
382  AC_MSG_RESULT($guile_cv_have_sin6_scope_id)
383  if test $guile_cv_have_sin6_scope_id = yes; then
384 -  AC_DEFINE(HAVE_SIN6_SCOPE_ID)
385 +  AC_DEFINE(HAVE_SIN6_SCOPE_ID, 1,
386 +    [Define this if your IPv6 has sin6_scope_id in sockaddr_in6 struct.])
387  fi
388  
389  AC_MSG_CHECKING(whether localtime caches TZ)
390 @@ -389,7 +425,7 @@ else
391  fi])dnl
392  AC_MSG_RESULT($guile_cv_localtime_cache)
393  if test $guile_cv_localtime_cache = yes; then
394 -  AC_DEFINE(LOCALTIME_CACHE)
395 +  AC_DEFINE(LOCALTIME_CACHE, 1, [Define if localtime caches the TZ setting.])
396  fi
397  
398  dnl Test whether system calls are restartable by default on the
399 @@ -408,15 +444,15 @@ if test "$enable_regex" = yes; then
400     if test "$ac_cv_header_regex_h" = yes ||
401        test "$ac_cv_header_rxposix_h" = yes ||
402        test "$ac_cv_header_rx_rxposix_h" = yes; then
403 -     GUILE_NAMED_CHECK_FUNC(regcomp, norx, [LIBOBJS="regex-posix.o $LIBOBJS"],
404 -     [AC_CHECK_LIB(rx, main)
405 -      GUILE_NAMED_CHECK_FUNC(regcomp, rx, [LIBOBJS="regex-posix.o $LIBOBJS"])]
406 -     )
407 +     GUILE_NAMED_CHECK_FUNC(regcomp, norx, [AC_LIBOBJ([regex-posix])],
408 +       [AC_CHECK_LIB(rx, main)
409 +        GUILE_NAMED_CHECK_FUNC(regcomp, rx, [AC_LIBOBJ([regex-posix])])])
410       dnl The following should not be necessary, but for some reason
411       dnl autoheader misses it if we don't include it!
412       if test "$ac_cv_func_regcomp_norx" = yes ||
413          test "$ac_cv_func_regcomp_rx" = yes; then
414 -       AC_DEFINE(HAVE_REGCOMP)
415 +       AC_DEFINE(HAVE_REGCOMP, 1,
416 +         [This is included as part of a workaround for a autoheader bug.])
417       fi
418     fi
419  fi
420 @@ -427,7 +463,7 @@ AC_REPLACE_FUNCS(inet_aton putenv strerr
421  # explicitly to LIBOBJS to make sure that it is translated to
422  # `alloca.lo' for libtool later on.  This can and should be done more cleanly.
423  AC_FUNC_ALLOCA
424 -if test "$ALLOCA" = "alloca.o"; then LIBOBJS="alloca.o $LIBOBJS"; fi
425 +if test "$ALLOCA" = "alloca.o"; then AC_LIBOBJ([alloca]); fi
426  
427  AC_CHECK_MEMBERS([struct stat.st_rdev])
428  AC_CHECK_MEMBERS([struct stat.st_blksize])
429 @@ -442,7 +478,8 @@ AC_CACHE_CHECK([for S_ISLNK in sys/stat.
430                 ac_cv_macro_S_ISLNK=yes,
431                 ac_cv_macro_S_ISLNK=no)])
432  if test $ac_cv_macro_S_ISLNK = yes; then
433 -  AC_DEFINE(HAVE_S_ISLNK)
434 +  AC_DEFINE(HAVE_S_ISLNK, 1,
435 +    [Define this if your system defines S_ISLNK in sys/stat.h.])
436  fi
437  
438  AC_STRUCT_TIMEZONE
439 @@ -457,7 +494,16 @@ GUILE_STRUCT_UTIMBUF
440  AC_TRY_RUN(aux (l) unsigned long l;
441              { int x; exit (l >= ((unsigned long)&x)); }
442            main () { int q; aux((unsigned long)&q); },
443 -          AC_DEFINE(SCM_STACK_GROWS_UP),,AC_MSG_WARN(Guessing that stack grows down -- see scmconfig.h.in))
444 +          [AC_DEFINE([SCM_STACK_GROWS_UP], 1,
445 +              [Define this if a callee's stack frame has a higher address
446 +               than the caller's stack frame.  On most machines, this is
447 +               not the case.])],
448 +           [],
449 +           [AC_MSG_WARN(Guessing that stack grows down -- see scmconfig.h.in)])
450 +
451 +
452 +AH_TEMPLATE([SCM_SINGLES],
453 +  [Define this if floats are the same size as longs.])
454  
455  AC_CACHE_CHECK([whether floats fit in longs], guile_cv_type_float_fits_long,
456      [AC_TRY_RUN([main () { exit (sizeof(float) > sizeof(long)); }],
457 @@ -486,7 +532,9 @@ AC_CACHE_VAL(scm_cv_struct_linger,
458                         scm_cv_struct_linger="no"))
459  AC_MSG_RESULT($scm_cv_struct_linger)
460  if test $scm_cv_struct_linger = yes; then
461 -       AC_DEFINE(HAVE_STRUCT_LINGER)
462 +       AC_DEFINE([HAVE_STRUCT_LINGER], 1,
463 +          [Define this if your system defines struct linger, for use with the
464 +           getsockopt and setsockopt system calls.])
465  fi
466  
467  
468 @@ -499,7 +547,8 @@ AC_CACHE_VAL(scm_cv_struct_timespec,
469                         scm_cv_struct_timespec="no"))
470  AC_MSG_RESULT($scm_cv_struct_timespec)
471  if test $scm_cv_struct_timespec = yes; then
472 -       AC_DEFINE(HAVE_STRUCT_TIMESPEC)
473 +       AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1,
474 +          [Define this if your system defines struct timespec via <time.h>.])
475  fi
476  
477  #--------------------------------------------------------------------
478 @@ -541,15 +590,16 @@ esac
479  ## If we're using threads, bring in some other parts of Guile which
480  ## work with them.
481  if test "${THREAD_PACKAGE}" != "" ; then
482 -  AC_DEFINE(USE_THREADS, 1)
483 +  AC_DEFINE(USE_THREADS, 1, [Define if using any sort of threads.])
484  
485    ## Include the Guile thread interface in the library...
486 -  LIBOBJS="$LIBOBJS threads.o"
487 +  AC_LIBOBJ([threads])
488  
489    ## ... and tell it which package to talk to.
490    case "${THREAD_PACKAGE}" in
491      "QT" )
492 -      AC_DEFINE(USE_COOP_THREADS, 1)
493 +      AC_DEFINE(USE_COOP_THREADS, 1,
494 +        [Define if using cooperative multithreading.])
495      ;;
496      * )
497        AC_MSG_ERROR(invalid value for THREAD_PACKAGE: ${THREAD_PACKAGE})
498 @@ -559,7 +609,7 @@ if test "${THREAD_PACKAGE}" != "" ; then
499    ## Bring in scm_internal_select, if appropriate.
500    if test $ac_cv_func_gettimeofday = yes &&
501       test $ac_cv_func_select = yes; then
502 -    AC_DEFINE(GUILE_ISELECT, 1)
503 +    AC_DEFINE(GUILE_ISELECT, 1, [Define to implement scm_internal_select.])
504    fi
505  
506    AC_ARG_ENABLE(linuxthreads,
507 @@ -568,11 +618,60 @@ if test "${THREAD_PACKAGE}" != "" ; then
508  
509    ## Workaround for linuxthreads (optionally disabled)
510    if test $host_os = linux-gnu -a "$enable_linuxthreads" = yes; then
511 -    AC_DEFINE(GUILE_PTHREAD_COMPAT, 1)
512 +    AC_DEFINE(GUILE_PTHREAD_COMPAT, 1,
513 +      [Define to enable workaround for COOP-linuxthreads compatibility.])
514      AC_CHECK_LIB(pthread, main)
515    fi
516  fi
517  
518 +## Cross building      
519 +if test "$cross_compiling" = "yes"; then
520 +  AC_MSG_CHECKING(cc for build)
521 +  ## /usr/bin/cc still uses wrong assembler
522 +  ## CC_FOR_BUILD="${CC_FOR_BUILD-/usr/bincc}"
523 +  CC_FOR_BUILD="${CC_FOR_BUILD-PATH=/usr/bin:$PATH cc}"
524 +else
525 +  CC_FOR_BUILD="${CC_FOR_BUILD-$CC}"
526 +fi   
527 +AC_ARG_WITH(cc-for-build,
528 +  [  --with-cc-for-build=CC  native C compiler, to be used during build])
529 +test -n "$with_cc_for_build" && CC_FOR_BUILD="$with_cc_for_build"
530 +     
531 +## AC_MSG_CHECKING("if we are cross compiling")
532 +## AC_MSG_RESULT($cross_compiling)
533 +if test "$cross_compiling" = "yes"; then
534 +   AC_MSG_RESULT($CC_FOR_BUILD)
535 +fi
536 +
537 +## No need as yet to be more elaborate
538 +CCLD_FOR_BUILD="$CC_FOR_BUILD"
539 +
540 +AC_SUBST(cross_compiling)
541 +AC_SUBST(CC_FOR_BUILD)
542 +AC_SUBST(CCLD_FOR_BUILD)
543 +       
544 +## libtool erroneously calls CC_FOR_BUILD HOST_CC;
545 +## --HOST is the platform that PACKAGE is compiled for.
546 +HOST_CC="$CC_FOR_BUILD"
547 +AC_SUBST(HOST_CC)
548 +
549 +if test "$cross_compiling" = "yes"; then
550 +  AC_MSG_CHECKING(guile for build)
551 +  GUILE_FOR_BUILD="${GUILE_FOR_BUILD-guile}"
552 +else
553 +  GUILE_FOR_BUILD='$(top_builddir_absolute)/pre-inst-guile'
554 +fi   
555 +AC_ARG_WITH(guile-for-build,
556 +  [  --with-guile-for-build=CC  native guile executable, to be used during build])
557 +test -n "$with_guile_for_build" && GUILE_FOR_BUILD="$with_cc_for_build"
558 +
559 +## AC_MSG_CHECKING("if we are cross compiling")
560 +## AC_MSG_RESULT($cross_compiling)
561 +if test "$cross_compiling" = "yes"; then
562 +   AC_MSG_RESULT($GUILE_FOR_BUILD)
563 +fi
564 +AC_SUBST(GUILE_FOR_BUILD)
565 +                       
566  ## If we're using GCC, ask for aggressive warnings.
567  case "$GCC" in
568    yes )
569 @@ -589,11 +688,11 @@ AC_PROG_AWK
570  ## If we're creating a shared library (using libtool!), then we'll
571  ## need to generate a list of .lo files corresponding to the .o files
572  ## given in LIBOBJS.  We'll call it LIBLOBJS.
573 -LIBLOBJS="`echo ${LIBOBJS} | sed 's/\.o/.lo/g'`"
574 +LIBLOBJS="`echo ${LIB@&t@OBJS} | sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`"
575  
576  ## We also need to create corresponding .doc and .x files
577 -EXTRA_DOT_DOC_FILES="`echo ${LIBOBJS} | sed 's/\.o/.doc/g'`"
578 -EXTRA_DOT_X_FILES="`echo ${LIBOBJS} | sed 's/\.o/.x/g'`"
579 +EXTRA_DOT_DOC_FILES="`echo ${LIB@&t@OBJS} | sed 's,\.[[^.]]* ,.doc ,g;s,\.[[^.]]*$,.doc,'`"
580 +EXTRA_DOT_X_FILES="`echo ${LIB@&t@OBJS} | sed 's,\.[[^.]]* ,.x ,g;s,\.[[^.]]*$,.x,'`"
581  
582  AC_SUBST(GUILE_MAJOR_VERSION)
583  AC_SUBST(GUILE_MINOR_VERSION)
584 @@ -617,11 +716,13 @@ AC_SUBST(LIBGUILE_SRFI_SRFI_4_INTERFACE_
585  AC_SUBST(LIBGUILE_SRFI_SRFI_4_INTERFACE_REVISION)
586  AC_SUBST(LIBGUILE_SRFI_SRFI_4_INTERFACE_AGE)
587  AC_SUBST(LIBGUILE_SRFI_SRFI_4_INTERFACE)
588 +AC_SUBST(LIBGUILE_SRFI_SRFI_4_LTHACK)
589  
590  AC_SUBST(LIBGUILE_SRFI_SRFI_13_14_INTERFACE_CURRENT)
591  AC_SUBST(LIBGUILE_SRFI_SRFI_13_14_INTERFACE_REVISION)
592  AC_SUBST(LIBGUILE_SRFI_SRFI_13_14_INTERFACE_AGE)
593  AC_SUBST(LIBGUILE_SRFI_SRFI_13_14_INTERFACE)
594 +AC_SUBST(LIBGUILE_SRFI_SRFI_13_14_LTHACK)
595  
596  #######################################################################
597  
598 diff -purN /home/fred/usr/src/guile-1.5.6/libguile/ChangeLog ./libguile/ChangeLog
599 --- /home/fred/usr/src/guile-1.5.6/libguile/ChangeLog   Sun Mar  3 02:14:37 2002
600 +++ ./libguile/ChangeLog        Thu Jul  4 03:27:54 2002
601 @@ -1,3 +1,14 @@
602 +2002-07-03  Jan Nieuwenhuizen  <janneke@gnu.org>
603 +
604 +       * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
605 +       this should be compiled for BUILD host.
606 +       Override default rule for
607 +       guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
608 +       Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
609 +
610 +       * guile.c, iselect.h, net_db.c, posix.c, socket.c: Cygwin compile
611 +       fixes. 
612 +
613  2002-03-01  Dirk Herrmann  <D.Herrmann@tu-bs.de>
614  
615         * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, DOUBLECELL_ALIGNED_P,
616 diff -purN /home/fred/usr/src/guile-1.5.6/libguile/Makefile.am ./libguile/Makefile.am
617 --- /home/fred/usr/src/guile-1.5.6/libguile/Makefile.am Fri Mar  1 19:19:36 2002
618 +++ ./libguile/Makefile.am      Thu Jul  4 03:27:23 2002
619 @@ -33,14 +33,33 @@ ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\
620  
621  lib_LTLIBRARIES = libguile.la
622  bin_PROGRAMS = guile
623 +
624  noinst_PROGRAMS = guile_filter_doc_snarfage
625 +guile_filter_doc_snarfage_SOURCES = c-tokenize.c
626 +
627 +## Override default rule; this should be compiled for BUILD host.
628 +## For some reason, OBJEXT does not include the dot
629 +c-tokenize.$(OBJEXT): c-tokenize.c
630 +       if [ "$(cross_compiling)" = "yes" ]; then \
631 +               $(CC_FOR_BUILD) -c -o $@ $<; \
632 +       else \
633 +               $(COMPILE) -c -o $@ $<; \
634 +       fi
635 +
636 +## Override default rule; this should run on BUILD host.
637 +guile_filter_doc_snarfage$(EXEEXT): $(guile_filter_doc_snarfage_OBJECTS) $(guile_filter_doc_snarfage_DEPENDENCIES) 
638 +       @rm -f guile_filter_doc_snarfage$(EXEEXT)
639 +       if [ "$(cross_compiling)" = "yes" ]; then \
640 +               $(CCLD_FOR_BUILD) -o $@ $(guile_filter_doc_snarfage_OBJECTS); \
641 +       else \
642 +               $(LINK) $(guile_filter_doc_snarfage_OBJECTS) $(LDADD) $(LIBS); \
643 +       fi
644 +
645  
646  guile_SOURCES = guile.c
647  guile_LDADD = libguile.la
648  guile_LDFLAGS = @DLPREOPEN@
649  
650 -guile_filter_doc_snarfage_SOURCES = c-tokenize.c
651 -
652  libguile_la_SOURCES = alist.c arbiters.c async.c backtrace.c boolean.c     \
653      chars.c continuations.c debug.c deprecation.c dynl.c dynwind.c         \
654      environments.c eq.c error.c eval.c evalext.c extensions.c              \
655 @@ -195,7 +214,7 @@ SUFFIXES = .x .doc
656  .c.doc:
657         -(test -n "${AWK+set}" || AWK="@AWK@"; ${AWK} -f ./guile-func-name-check $<)
658         (./guile-snarf-docs $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< | \
659 -       ./guile_filter_doc_snarfage --filter-snarfage) > $@ || { rm $@; false; }
660 +       ./guile_filter_doc_snarfage$(EXEEXT) --filter-snarfage) > $@ || { rm $@; false; }
661  
662  $(DOT_X_FILES) $(EXTRA_DOT_DOC_FILES): snarf.h guile-snarf.in
663  
664 diff -purN /home/fred/usr/src/guile-1.5.6/libguile/guile.c ./libguile/guile.c
665 --- /home/fred/usr/src/guile-1.5.6/libguile/guile.c     Wed Jun 27 21:30:20 2001
666 +++ ./libguile/guile.c  Thu Jul  4 03:25:46 2002
667 @@ -55,7 +55,8 @@
668  #include <libltdl/ltdl.h>
669  #endif
670  
671 -#ifdef HAVE_WINSOCK2_H
672 +#if defined (HAVE_WINSOCK2_H) \
673 +  && !(defined (__CYGWIN32__) || defined (__CYGWIN__))
674  #include <winsock2.h>
675  #endif
676  
677 diff -purN /home/fred/usr/src/guile-1.5.6/libguile/iselect.h ./libguile/iselect.h
678 --- /home/fred/usr/src/guile-1.5.6/libguile/iselect.h   Mon Jul 23 22:48:44 2001
679 +++ ./libguile/iselect.h        Thu Jul  4 03:25:46 2002
680 @@ -67,7 +67,8 @@
681  #include <sys/select.h>
682  #endif
683  
684 -#ifdef HAVE_WINSOCK2_H
685 +#if defined (HAVE_WINSOCK2_H) \
686 +  && !(defined (__CYGWIN32__) || defined (__CYGWIN__))
687  #include <winsock2.h>
688  #endif
689  
690 diff -purN /home/fred/usr/src/guile-1.5.6/libguile/net_db.c ./libguile/net_db.c
691 --- /home/fred/usr/src/guile-1.5.6/libguile/net_db.c    Mon Jul  9 16:24:40 2001
692 +++ ./libguile/net_db.c Thu Jul  4 03:25:46 2002
693 @@ -65,7 +65,8 @@
694  
695  #include <sys/types.h>
696  
697 -#ifdef HAVE_WINSOCK2_H
698 +#if defined (HAVE_WINSOCK2_H) \
699 +  && !(defined (__CYGWIN32__) || defined (__CYGWIN__))
700  #include <winsock2.h>
701  #else
702  #include <sys/socket.h>
703 diff -purN /home/fred/usr/src/guile-1.5.6/libguile/posix.c ./libguile/posix.c
704 --- /home/fred/usr/src/guile-1.5.6/libguile/posix.c     Sat Nov 17 20:03:43 2001
705 +++ ./libguile/posix.c  Thu Jul  4 03:25:46 2002
706 @@ -95,7 +95,8 @@ extern char *ttyname();
707  #ifdef HAVE_IO_H
708  #include <io.h>
709  #endif
710 -#ifdef HAVE_WINSOCK2_H
711 +#if defined (HAVE_WINSOCK2_H) \
712 +  && !(defined (__CYGWIN32__) || defined (__CYGWIN__))
713  #include <winsock2.h>
714  #endif
715  
716 diff -purN /home/fred/usr/src/guile-1.5.6/libguile/socket.c ./libguile/socket.c
717 --- /home/fred/usr/src/guile-1.5.6/libguile/socket.c    Mon Jul  9 16:24:40 2001
718 +++ ./libguile/socket.c Thu Jul  4 03:25:46 2002
719 @@ -61,7 +61,8 @@
720  #include <unistd.h>
721  #endif
722  #include <sys/types.h>
723 -#ifdef HAVE_WINSOCK2_H
724 +#if defined (HAVE_WINSOCK2_H) \
725 +  && !(defined (__CYGWIN32__) || defined (__CYGWIN__))
726  #include <winsock2.h>
727  #else
728  #include <sys/socket.h>
729 diff -purN /home/fred/usr/src/guile-1.5.6/qt/Makefile.am ./qt/Makefile.am
730 --- /home/fred/usr/src/guile-1.5.6/qt/Makefile.am       Fri Feb 15 23:11:29 2002
731 +++ ./qt/Makefile.am    Thu Jul  4 03:53:53 2002
732 @@ -24,7 +24,7 @@ AUTOMAKE_OPTIONS = gnu
733  ## subdirs are for making distributions only.
734  SUBDIRS = md time
735  
736 -lib_LTLIBRARIES = @QTHREAD_LTLIBS@
737 +lib_LTLIBRARIES =
738  EXTRA_LTLIBRARIES = libqthreads.la
739  
740  ## Prevent automake from adding extra -I options
741 diff -purN /home/fred/usr/src/guile-1.5.6/qt/Makefile.in ./qt/Makefile.in
742 --- /home/fred/usr/src/guile-1.5.6/qt/Makefile.in       Tue Mar  5 00:43:37 2002
743 +++ ./qt/Makefile.in    Thu Jul  4 04:02:33 2002
744 @@ -124,7 +124,7 @@ AUTOMAKE_OPTIONS = gnu
745  
746  SUBDIRS = md time
747  
748 -lib_LTLIBRARIES = @QTHREAD_LTLIBS@
749 +lib_LTLIBRARIES =
750  EXTRA_LTLIBRARIES = libqthreads.la
751  
752  DEFS = @DEFS@
753 diff -purN /home/fred/usr/src/guile-1.5.6/srfi/Makefile.am ./srfi/Makefile.am
754 --- /home/fred/usr/src/guile-1.5.6/srfi/Makefile.am     Sat Feb 23 23:10:04 2002
755 +++ ./srfi/Makefile.am  Tue Apr  9 19:26:37 2002
756 @@ -29,19 +29,21 @@ DEFS = @DEFS@
757  INCLUDES = -I.. -I$(srcdir)/..
758  
759  
760 -lib_LTLIBRARIES = libguile-srfi-srfi-13-14.la libguile-srfi-srfi-4.la
761 +lib_LTLIBRARIES = \
762 +       libguile-srfi-srfi-4-lt-@LIBGUILE_SRFI_SRFI_4_LTHACK@.la \
763 +       libguile-srfi-srfi-13-14-lt-@LIBGUILE_SRFI_SRFI_13_14_LTHACK@.la
764  
765  BUILT_SOURCES = srfi-13.x srfi-14.x srfi-4.x
766  
767 -libguile_srfi_srfi_4_la_SOURCES = srfi-4.x srfi-4.c srfi-4.h
768 -libguile_srfi_srfi_4_la_LIBADD = ../libguile/libguile.la
769 -libguile_srfi_srfi_4_la_LDFLAGS = -export-dynamic \
770 +libguile_srfi_srfi_4_lt_@LIBGUILE_SRFI_SRFI_4_LTHACK@_la_SOURCES = srfi-4.x srfi-4.c srfi-4.h
771 +libguile_srfi_srfi_4_lt_@LIBGUILE_SRFI_SRFI_4_LTHACK@_la_LIBADD = ../libguile/libguile.la
772 +libguile_srfi_srfi_4_lt_@LIBGUILE_SRFI_SRFI_4_LTHACK@_la_LDFLAGS = -export-dynamic \
773    -version-info @LIBGUILE_SRFI_SRFI_4_INTERFACE@
774  
775 -libguile_srfi_srfi_13_14_la_SOURCES = srfi-13.x srfi-13.c srfi-14.x srfi-14.c\
776 +libguile_srfi_srfi_13_14_lt_@LIBGUILE_SRFI_SRFI_13_14_LTHACK@_la_SOURCES = srfi-13.x srfi-13.c srfi-14.x srfi-14.c\
777   srfi-13.h srfi-14.h
778 -libguile_srfi_srfi_13_14_la_LIBADD = ../libguile/libguile.la
779 -libguile_srfi_srfi_13_14_la_LDFLAGS = -export-dynamic \
780 +libguile_srfi_srfi_13_14_lt_@LIBGUILE_SRFI_SRFI_13_14_LTHACK@_la_LIBADD = ../libguile/libguile.la
781 +libguile_srfi_srfi_13_14_lt_@LIBGUILE_SRFI_SRFI_13_14_LTHACK@_la_LDFLAGS = -export-dynamic \
782    -version-info @LIBGUILE_SRFI_SRFI_13_14_INTERFACE@
783  
784  srfidir = $(datadir)/guile/$(VERSION)/srfi
785 @@ -65,9 +67,10 @@ GUILE_SNARF = ../libguile/guile-snarf
786  
787  MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
788  
789 +snarfcppopts = $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
790 +
791  SUFFIXES = .x
792  .c.x:
793 -       $(GUILE_SNARF) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ \
794 -       || { rm $@; false; }
795 +       $(GUILE_SNARF) -o $@ $< $(snarfcppopts)
796  
797  CLEANFILES = *.x