Commit c411f140f305ebb00d33c92b7cb2742bcd241b6a

Anthony Green 2011-11-12T07:32:36

Fix ax_enable_builddir macro on BSD systems

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
diff --git a/ChangeLog b/ChangeLog
index 8a83fb7..f965aec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,22 +1,7 @@
-2011-11-12  Anthony Green  <green@moxielogic.com>
+2011-11-12  Kimura Wataru  <kimuraw@i.nifty.jp>
 
-	* Makefile.am (AM_CCASFLAGS): Add -g option to build assembly
-	files with debug info.
-	* Makefile.in: Rebuilt.
-
-2011-11-12  Jasper Lievisse Adriaanse <jasper@openbsd.org>
-
-	* README: Update list of supported OpenBSD systems.
-
-2011-11-12  Anthony Green  <green@moxielogic.com>
-
-	* libtool-version: Update.
-	* Makefile.am (nodist_libffi_la_SOURCES): Add src/debug.c if
-	FFI_DEBUG.
-	(libffi_la_SOURCES): Remove src/debug.c
-	(EXTRA_DIST): Add src/debug.c
-	* Makefile.in: Rebuilt.
-	* README: Update for 3.0.11.
+	* m4/ax_enable_builddir: Change from string comparison to numeric
+	comparison for wc output. 
 
 2011-11-10  Richard Henderson  <rth@redhat.com>
 
diff --git a/Makefile.am b/Makefile.am
index 2c2444e..36db3f2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -88,7 +88,7 @@ ACLOCAL_AMFLAGS=$(ACLOCAL_AMFLAGS) -I m4
 lib_LTLIBRARIES = libffi.la
 noinst_LTLIBRARIES = libffi_convenience.la
 
-libffi_la_SOURCES = src/prep_cif.c src/types.c \
+libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c \
 		src/raw_api.c src/java_raw_api.c src/closures.c
 
 pkgconfigdir = $(libdir)/pkgconfig
@@ -96,10 +96,6 @@ pkgconfig_DATA = libffi.pc
 
 nodist_libffi_la_SOURCES =
 
-if FFI_DEBUG
-nodist_libffi_la_SOURCES += src/debug.c
-endif
-
 if MIPS
 nodist_libffi_la_SOURCES += src/mips/ffi.c src/mips/o32.S src/mips/n32.S
 endif
@@ -195,7 +191,7 @@ endif
 libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) $(AM_LTLDFLAGS)
 
 AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
-AM_CCASFLAGS = $(AM_CPPFLAGS) -g
+AM_CCASFLAGS = $(AM_CPPFLAGS)
 
 # No install-html or install-pdf support in automake yet
 .PHONY: install-html install-pdf
diff --git a/Makefile.in b/Makefile.in
index 4dc1103..b3a2706 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -36,37 +36,36 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-@FFI_DEBUG_TRUE@am__append_1 = src/debug.c
-@MIPS_TRUE@am__append_2 = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
-@X86_TRUE@am__append_3 = src/x86/ffi.c src/x86/sysv.S
-@X86_FREEBSD_TRUE@am__append_4 = src/x86/ffi.c src/x86/freebsd.S
-@X86_WIN32_TRUE@am__append_5 = src/x86/ffi.c src/x86/win32.S
-@X86_WIN64_TRUE@am__append_6 = src/x86/ffi.c src/x86/win64.S
-@X86_DARWIN_TRUE@am__append_7 = src/x86/ffi.c src/x86/darwin.S src/x86/ffi64.c src/x86/darwin64.S
-@SPARC_TRUE@am__append_8 = src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
-@ALPHA_TRUE@am__append_9 = src/alpha/ffi.c src/alpha/osf.S
-@IA64_TRUE@am__append_10 = src/ia64/ffi.c src/ia64/unix.S
-@M32R_TRUE@am__append_11 = src/m32r/sysv.S src/m32r/ffi.c
-@M68K_TRUE@am__append_12 = src/m68k/ffi.c src/m68k/sysv.S
-@POWERPC_TRUE@am__append_13 = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S src/powerpc/linux64.S src/powerpc/linux64_closure.S
-@POWERPC_AIX_TRUE@am__append_14 = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
-@POWERPC_DARWIN_TRUE@am__append_15 = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
-@POWERPC_FREEBSD_TRUE@am__append_16 = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
-@ARM_TRUE@am__append_17 = src/arm/sysv.S src/arm/ffi.c
-@ARM_TRUE@@FFI_EXEC_TRAMPOLINE_TABLE_TRUE@am__append_18 = src/arm/trampoline.S
-@AVR32_TRUE@am__append_19 = src/avr32/sysv.S src/avr32/ffi.c
-@LIBFFI_CRIS_TRUE@am__append_20 = src/cris/sysv.S src/cris/ffi.c
-@FRV_TRUE@am__append_21 = src/frv/eabi.S src/frv/ffi.c
-@MOXIE_TRUE@am__append_22 = src/moxie/eabi.S src/moxie/ffi.c
-@S390_TRUE@am__append_23 = src/s390/sysv.S src/s390/ffi.c
-@X86_64_TRUE@am__append_24 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
-@SH_TRUE@am__append_25 = src/sh/sysv.S src/sh/ffi.c
-@SH64_TRUE@am__append_26 = src/sh64/sysv.S src/sh64/ffi.c
-@PA_LINUX_TRUE@am__append_27 = src/pa/linux.S src/pa/ffi.c
-@PA_HPUX_TRUE@am__append_28 = src/pa/hpux32.S src/pa/ffi.c
+@MIPS_TRUE@am__append_1 = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
+@X86_TRUE@am__append_2 = src/x86/ffi.c src/x86/sysv.S
+@X86_FREEBSD_TRUE@am__append_3 = src/x86/ffi.c src/x86/freebsd.S
+@X86_WIN32_TRUE@am__append_4 = src/x86/ffi.c src/x86/win32.S
+@X86_WIN64_TRUE@am__append_5 = src/x86/ffi.c src/x86/win64.S
+@X86_DARWIN_TRUE@am__append_6 = src/x86/ffi.c src/x86/darwin.S src/x86/ffi64.c src/x86/darwin64.S
+@SPARC_TRUE@am__append_7 = src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
+@ALPHA_TRUE@am__append_8 = src/alpha/ffi.c src/alpha/osf.S
+@IA64_TRUE@am__append_9 = src/ia64/ffi.c src/ia64/unix.S
+@M32R_TRUE@am__append_10 = src/m32r/sysv.S src/m32r/ffi.c
+@M68K_TRUE@am__append_11 = src/m68k/ffi.c src/m68k/sysv.S
+@POWERPC_TRUE@am__append_12 = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S src/powerpc/linux64.S src/powerpc/linux64_closure.S
+@POWERPC_AIX_TRUE@am__append_13 = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
+@POWERPC_DARWIN_TRUE@am__append_14 = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
+@POWERPC_FREEBSD_TRUE@am__append_15 = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
+@ARM_TRUE@am__append_16 = src/arm/sysv.S src/arm/ffi.c
+@ARM_TRUE@@FFI_EXEC_TRAMPOLINE_TABLE_TRUE@am__append_17 = src/arm/trampoline.S
+@AVR32_TRUE@am__append_18 = src/avr32/sysv.S src/avr32/ffi.c
+@LIBFFI_CRIS_TRUE@am__append_19 = src/cris/sysv.S src/cris/ffi.c
+@FRV_TRUE@am__append_20 = src/frv/eabi.S src/frv/ffi.c
+@MOXIE_TRUE@am__append_21 = src/moxie/eabi.S src/moxie/ffi.c
+@S390_TRUE@am__append_22 = src/s390/sysv.S src/s390/ffi.c
+@X86_64_TRUE@am__append_23 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
+@SH_TRUE@am__append_24 = src/sh/sysv.S src/sh/ffi.c
+@SH64_TRUE@am__append_25 = src/sh64/sysv.S src/sh64/ffi.c
+@PA_LINUX_TRUE@am__append_26 = src/pa/linux.S src/pa/ffi.c
+@PA_HPUX_TRUE@am__append_27 = src/pa/hpux32.S src/pa/ffi.c
 # Build debug. Define FFI_DEBUG on the commandline so that, when building with
 # MSVC, it can link against the debug CRT.
-@FFI_DEBUG_TRUE@am__append_29 = -DFFI_DEBUG
+@FFI_DEBUG_TRUE@am__append_28 = -DFFI_DEBUG
 subdir = .
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
 	$(srcdir)/Makefile.in $(srcdir)/doc/stamp-vti \
@@ -122,49 +121,48 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(infodir)" \
 LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
 libffi_la_LIBADD =
 am__dirstamp = $(am__leading_dot)dirstamp
-am_libffi_la_OBJECTS = src/prep_cif.lo src/types.lo src/raw_api.lo \
-	src/java_raw_api.lo src/closures.lo
-@FFI_DEBUG_TRUE@am__objects_1 = src/debug.lo
-@MIPS_TRUE@am__objects_2 = src/mips/ffi.lo src/mips/o32.lo \
+am_libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \
+	src/raw_api.lo src/java_raw_api.lo src/closures.lo
+@MIPS_TRUE@am__objects_1 = src/mips/ffi.lo src/mips/o32.lo \
 @MIPS_TRUE@	src/mips/n32.lo
-@X86_TRUE@am__objects_3 = src/x86/ffi.lo src/x86/sysv.lo
-@X86_FREEBSD_TRUE@am__objects_4 = src/x86/ffi.lo src/x86/freebsd.lo
-@X86_WIN32_TRUE@am__objects_5 = src/x86/ffi.lo src/x86/win32.lo
-@X86_WIN64_TRUE@am__objects_6 = src/x86/ffi.lo src/x86/win64.lo
-@X86_DARWIN_TRUE@am__objects_7 = src/x86/ffi.lo src/x86/darwin.lo \
+@X86_TRUE@am__objects_2 = src/x86/ffi.lo src/x86/sysv.lo
+@X86_FREEBSD_TRUE@am__objects_3 = src/x86/ffi.lo src/x86/freebsd.lo
+@X86_WIN32_TRUE@am__objects_4 = src/x86/ffi.lo src/x86/win32.lo
+@X86_WIN64_TRUE@am__objects_5 = src/x86/ffi.lo src/x86/win64.lo
+@X86_DARWIN_TRUE@am__objects_6 = src/x86/ffi.lo src/x86/darwin.lo \
 @X86_DARWIN_TRUE@	src/x86/ffi64.lo src/x86/darwin64.lo
-@SPARC_TRUE@am__objects_8 = src/sparc/ffi.lo src/sparc/v8.lo \
+@SPARC_TRUE@am__objects_7 = src/sparc/ffi.lo src/sparc/v8.lo \
 @SPARC_TRUE@	src/sparc/v9.lo
-@ALPHA_TRUE@am__objects_9 = src/alpha/ffi.lo src/alpha/osf.lo
-@IA64_TRUE@am__objects_10 = src/ia64/ffi.lo src/ia64/unix.lo
-@M32R_TRUE@am__objects_11 = src/m32r/sysv.lo src/m32r/ffi.lo
-@M68K_TRUE@am__objects_12 = src/m68k/ffi.lo src/m68k/sysv.lo
-@POWERPC_TRUE@am__objects_13 = src/powerpc/ffi.lo src/powerpc/sysv.lo \
+@ALPHA_TRUE@am__objects_8 = src/alpha/ffi.lo src/alpha/osf.lo
+@IA64_TRUE@am__objects_9 = src/ia64/ffi.lo src/ia64/unix.lo
+@M32R_TRUE@am__objects_10 = src/m32r/sysv.lo src/m32r/ffi.lo
+@M68K_TRUE@am__objects_11 = src/m68k/ffi.lo src/m68k/sysv.lo
+@POWERPC_TRUE@am__objects_12 = src/powerpc/ffi.lo src/powerpc/sysv.lo \
 @POWERPC_TRUE@	src/powerpc/ppc_closure.lo \
 @POWERPC_TRUE@	src/powerpc/linux64.lo \
 @POWERPC_TRUE@	src/powerpc/linux64_closure.lo
-@POWERPC_AIX_TRUE@am__objects_14 = src/powerpc/ffi_darwin.lo \
+@POWERPC_AIX_TRUE@am__objects_13 = src/powerpc/ffi_darwin.lo \
 @POWERPC_AIX_TRUE@	src/powerpc/aix.lo \
 @POWERPC_AIX_TRUE@	src/powerpc/aix_closure.lo
-@POWERPC_DARWIN_TRUE@am__objects_15 = src/powerpc/ffi_darwin.lo \
+@POWERPC_DARWIN_TRUE@am__objects_14 = src/powerpc/ffi_darwin.lo \
 @POWERPC_DARWIN_TRUE@	src/powerpc/darwin.lo \
 @POWERPC_DARWIN_TRUE@	src/powerpc/darwin_closure.lo
-@POWERPC_FREEBSD_TRUE@am__objects_16 = src/powerpc/ffi.lo \
+@POWERPC_FREEBSD_TRUE@am__objects_15 = src/powerpc/ffi.lo \
 @POWERPC_FREEBSD_TRUE@	src/powerpc/sysv.lo \
 @POWERPC_FREEBSD_TRUE@	src/powerpc/ppc_closure.lo
-@ARM_TRUE@am__objects_17 = src/arm/sysv.lo src/arm/ffi.lo
-@ARM_TRUE@@FFI_EXEC_TRAMPOLINE_TABLE_TRUE@am__objects_18 = src/arm/trampoline.lo
-@AVR32_TRUE@am__objects_19 = src/avr32/sysv.lo src/avr32/ffi.lo
-@LIBFFI_CRIS_TRUE@am__objects_20 = src/cris/sysv.lo src/cris/ffi.lo
-@FRV_TRUE@am__objects_21 = src/frv/eabi.lo src/frv/ffi.lo
-@MOXIE_TRUE@am__objects_22 = src/moxie/eabi.lo src/moxie/ffi.lo
-@S390_TRUE@am__objects_23 = src/s390/sysv.lo src/s390/ffi.lo
-@X86_64_TRUE@am__objects_24 = src/x86/ffi64.lo src/x86/unix64.lo \
+@ARM_TRUE@am__objects_16 = src/arm/sysv.lo src/arm/ffi.lo
+@ARM_TRUE@@FFI_EXEC_TRAMPOLINE_TABLE_TRUE@am__objects_17 = src/arm/trampoline.lo
+@AVR32_TRUE@am__objects_18 = src/avr32/sysv.lo src/avr32/ffi.lo
+@LIBFFI_CRIS_TRUE@am__objects_19 = src/cris/sysv.lo src/cris/ffi.lo
+@FRV_TRUE@am__objects_20 = src/frv/eabi.lo src/frv/ffi.lo
+@MOXIE_TRUE@am__objects_21 = src/moxie/eabi.lo src/moxie/ffi.lo
+@S390_TRUE@am__objects_22 = src/s390/sysv.lo src/s390/ffi.lo
+@X86_64_TRUE@am__objects_23 = src/x86/ffi64.lo src/x86/unix64.lo \
 @X86_64_TRUE@	src/x86/ffi.lo src/x86/sysv.lo
-@SH_TRUE@am__objects_25 = src/sh/sysv.lo src/sh/ffi.lo
-@SH64_TRUE@am__objects_26 = src/sh64/sysv.lo src/sh64/ffi.lo
-@PA_LINUX_TRUE@am__objects_27 = src/pa/linux.lo src/pa/ffi.lo
-@PA_HPUX_TRUE@am__objects_28 = src/pa/hpux32.lo src/pa/ffi.lo
+@SH_TRUE@am__objects_24 = src/sh/sysv.lo src/sh/ffi.lo
+@SH64_TRUE@am__objects_25 = src/sh64/sysv.lo src/sh64/ffi.lo
+@PA_LINUX_TRUE@am__objects_26 = src/pa/linux.lo src/pa/ffi.lo
+@PA_HPUX_TRUE@am__objects_27 = src/pa/hpux32.lo src/pa/ffi.lo
 nodist_libffi_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
 	$(am__objects_3) $(am__objects_4) $(am__objects_5) \
 	$(am__objects_6) $(am__objects_7) $(am__objects_8) \
@@ -174,17 +172,17 @@ nodist_libffi_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
 	$(am__objects_18) $(am__objects_19) $(am__objects_20) \
 	$(am__objects_21) $(am__objects_22) $(am__objects_23) \
 	$(am__objects_24) $(am__objects_25) $(am__objects_26) \
-	$(am__objects_27) $(am__objects_28)
+	$(am__objects_27)
 libffi_la_OBJECTS = $(am_libffi_la_OBJECTS) \
 	$(nodist_libffi_la_OBJECTS)
 libffi_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
 	$(libffi_la_LDFLAGS) $(LDFLAGS) -o $@
 libffi_convenience_la_LIBADD =
-am__objects_29 = src/prep_cif.lo src/types.lo src/raw_api.lo \
-	src/java_raw_api.lo src/closures.lo
-am_libffi_convenience_la_OBJECTS = $(am__objects_29)
-am__objects_30 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \
+am__objects_28 = src/debug.lo src/prep_cif.lo src/types.lo \
+	src/raw_api.lo src/java_raw_api.lo src/closures.lo
+am_libffi_convenience_la_OBJECTS = $(am__objects_28)
+am__objects_29 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \
 	$(am__objects_4) $(am__objects_5) $(am__objects_6) \
 	$(am__objects_7) $(am__objects_8) $(am__objects_9) \
 	$(am__objects_10) $(am__objects_11) $(am__objects_12) \
@@ -192,9 +190,8 @@ am__objects_30 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \
 	$(am__objects_16) $(am__objects_17) $(am__objects_18) \
 	$(am__objects_19) $(am__objects_20) $(am__objects_21) \
 	$(am__objects_22) $(am__objects_23) $(am__objects_24) \
-	$(am__objects_25) $(am__objects_26) $(am__objects_27) \
-	$(am__objects_28)
-nodist_libffi_convenience_la_OBJECTS = $(am__objects_30)
+	$(am__objects_25) $(am__objects_26) $(am__objects_27)
+nodist_libffi_convenience_la_OBJECTS = $(am__objects_29)
 libffi_convenience_la_OBJECTS = $(am_libffi_convenience_la_OBJECTS) \
 	$(nodist_libffi_convenience_la_OBJECTS)
 DEFAULT_INCLUDES = -I.@am__isrc@
@@ -492,7 +489,7 @@ MAKEOVERRIDES =
 ACLOCAL_AMFLAGS = $(ACLOCAL_AMFLAGS) -I m4
 lib_LTLIBRARIES = libffi.la
 noinst_LTLIBRARIES = libffi_convenience.la
-libffi_la_SOURCES = src/prep_cif.c src/types.c \
+libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c \
 		src/raw_api.c src/java_raw_api.c src/closures.c
 
 pkgconfigdir = $(libdir)/pkgconfig
@@ -506,13 +503,13 @@ nodist_libffi_la_SOURCES = $(am__append_1) $(am__append_2) \
 	$(am__append_18) $(am__append_19) $(am__append_20) \
 	$(am__append_21) $(am__append_22) $(am__append_23) \
 	$(am__append_24) $(am__append_25) $(am__append_26) \
-	$(am__append_27) $(am__append_28)
+	$(am__append_27)
 libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
 nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
-AM_CFLAGS = -g $(am__append_29)
+AM_CFLAGS = -g $(am__append_28)
 libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) $(AM_LTLDFLAGS)
 AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
-AM_CCASFLAGS = $(AM_CPPFLAGS) -g
+AM_CCASFLAGS = $(AM_CPPFLAGS)
 all: fficonfig.h
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
 
@@ -617,12 +614,12 @@ src/$(am__dirstamp):
 src/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) src/$(DEPDIR)
 	@: > src/$(DEPDIR)/$(am__dirstamp)
+src/debug.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
 src/prep_cif.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
 src/types.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
 src/raw_api.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
 src/java_raw_api.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
 src/closures.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
-src/debug.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
 src/mips/$(am__dirstamp):
 	@$(MKDIR_P) src/mips
 	@: > src/mips/$(am__dirstamp)
diff --git a/configure b/configure
index bbd9ecc..4ce690f 100755
--- a/configure
+++ b/configure
@@ -12240,6 +12240,45 @@ $as_echo "$icc_archflag" >&6; }
      # default optimization flags for gcc on all systems
      CFLAGS="-O3 -fomit-frame-pointer"
 
+     # -malign-double for x86 systems
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -malign-double" >&5
+$as_echo_n "checking whether C compiler accepts -malign-double... " >&6; }
+if ${ax_cv_c_flags__malign_double+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      ax_save_FLAGS=$CFLAGS
+      CFLAGS="-malign-double"
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ax_cv_c_flags__malign_double=yes
+else
+  ax_cv_c_flags__malign_double=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      CFLAGS=$ax_save_FLAGS
+fi
+
+eval ax_check_compiler_flags=$ax_cv_c_flags__malign_double
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5
+$as_echo "$ax_check_compiler_flags" >&6; }
+if test "x$ax_check_compiler_flags" = xyes; then
+	CFLAGS="$CFLAGS -malign-double"
+else
+	:
+fi
+
+
      #  -fstrict-aliasing for gcc-2.95+
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fstrict-aliasing" >&5
 $as_echo_n "checking whether C compiler accepts -fstrict-aliasing... " >&6; }
@@ -12279,6 +12318,7 @@ else
 fi
 
 
+     # note that we enable "unsafe" fp optimization with other compilers, too
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -ffast-math" >&5
 $as_echo_n "checking whether C compiler accepts -ffast-math... " >&6; }
 if ${ax_cv_c_flags__ffast_math+:} false; then :
@@ -13065,7 +13105,7 @@ case "$host" in
 	TARGET=FRV; TARGETDIR=frv
 	;;
 
-  hppa*-*-linux* | parisc*-*-linux* | hppa*-*-openbsd*)
+  hppa*-*-linux* | parisc*-*-linux*)
 	TARGET=PA_LINUX; TARGETDIR=pa
 	;;
   hppa*64-*-hpux*)
@@ -13115,7 +13155,7 @@ case "$host" in
   mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
 	TARGET=MIPS; TARGETDIR=mips
 	;;
-  mips*-*-linux* | mips*-*-openbsd*)
+  mips*-*-linux*)
 	# Support 128-bit long double for NewABI.
 	HAVE_LONG_DOUBLE='defined(__mips64)'
 	TARGET=MIPS; TARGETDIR=mips
@@ -13137,7 +13177,7 @@ case "$host" in
   powerpc-*-aix* | rs6000-*-aix*)
 	TARGET=POWERPC_AIX; TARGETDIR=powerpc
 	;;
-  powerpc-*-freebsd* | powerpc-*-openbsd*)
+  powerpc-*-freebsd*)
 	TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
 	;;
   powerpc64-*-freebsd*)
@@ -16344,7 +16384,7 @@ a\\
 	; test ".\$\$HOST" = "." && HOST=$x sh $ax_enable_builddir_auxdir/config.guess $x \\\\\\
 	; BUILD=$x grep "^#### \$\$HOST " Makefile | sed -e 's/.*|//' $x \\\\\\
 	; use=$x basename "\$\@" -all $x; n=$x echo \$\$BUILD | wc -w $x \\\\\\
-	; echo "MAKE \$\$HOST : \$\$n * \$\@"; if test "\$\$n" = "0" ; then : \\\\\\
+	; echo "MAKE \$\$HOST : \$\$n * \$\@"; if test "\$\$n" -eq "0" ; then : \\\\\\
 	; BUILD=$x grep "^####.*|" Makefile |tail -1| sed -e 's/.*|//' $x ; fi \\\\\\
 	; test ".\$\$BUILD" = "." && BUILD="." \\\\\\
 	; test "\$\$use" = "\$\@" && BUILD=$x echo "\$\$BUILD" | tail -1 $x \\\\\\
@@ -16356,7 +16396,7 @@ a\\
 	; BUILD=$x grep "^#### \$\$HOST " Makefile | sed -e 's/.*|//' $x \\\\\\
 	; found=$x echo \$\$BUILD | wc -w $x \\\\\\
 	; echo "MAKE \$\$HOST : \$\$found \$(PACKAGE)-\$(VERSION).tar.*" \\\\\\
-	; if test "\$\$found" = "0" ; then : \\\\\\
+	; if test "\$\$found" -eq "0" ; then : \\\\\\
 	; BUILD=$x grep "^#### .*|" Makefile |tail -1| sed -e 's/.*|//' $x \\\\\\
 	; fi ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\
 	; for f in \$\$i/\$(PACKAGE)-\$(VERSION).tar.* \\\\\\
@@ -16367,7 +16407,7 @@ a\\
 	; BUILD=$x grep "^#### \$\$HOST " Makefile | sed -e 's/.*|//' $x \\\\\\
 	; found=$x echo \$\$BUILD | wc -w $x \\\\\\
 	; echo "MAKE \$\$HOST : \$\$found \$(PACKAGE)-\$(VERSION).*" \\\\\\
-	; if test "\$\$found" = "0" ; then : \\\\\\
+	; if test "\$\$found" -eq "0" ; then : \\\\\\
 	; BUILD=$x grep "^#### .*|" Makefile |tail -1| sed -e 's/.*|//' $x \\\\\\
 	; fi ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\
 	; for f in \$\$i/\$(PACKAGE)-\$(VERSION).* \\\\\\
diff --git a/libtool-version b/libtool-version
index 95f48c5..b8b80e0 100644
--- a/libtool-version
+++ b/libtool-version
@@ -26,4 +26,4 @@
 #    release, then set age to 0.
 #
 # CURRENT:REVISION:AGE
-6:0:0
+5:10:0
diff --git a/m4/ax_enable_builddir.m4 b/m4/ax_enable_builddir.m4
index 959dec3..98ea911 100644
--- a/m4/ax_enable_builddir.m4
+++ b/m4/ax_enable_builddir.m4
@@ -204,7 +204,7 @@ a\\
 	; test ".\$\$HOST" = "." && HOST=$x sh $AUX/config.guess $x \\\\\\
 	; BUILD=$x grep "^#### \$\$HOST " Makefile | sed -e 's/.*|//' $x \\\\\\
 	; use=$x basename "\$\@" _ALL $x; n=$x echo \$\$BUILD | wc -w $x \\\\\\
-	; echo "MAKE \$\$HOST : \$\$n * \$\@"; if test "\$\$n" = "0" ; then : \\\\\\
+	; echo "MAKE \$\$HOST : \$\$n * \$\@"; if test "\$\$n" -eq "0" ; then : \\\\\\
 	; BUILD=$x grep "^####.*|" Makefile |tail -1| sed -e 's/.*|//' $x ; fi \\\\\\
 	; test ".\$\$BUILD" = "." && BUILD="." \\\\\\
 	; test "\$\$use" = "\$\@" && BUILD=$x echo "\$\$BUILD" | tail -1 $x \\\\\\
@@ -217,7 +217,7 @@ dnl special rule add-on: "dist" copies the tarball to $(PUB). (source tree)
 	; BUILD=$x grep "^#### \$\$HOST " Makefile | sed -e 's/.*|//' $x \\\\\\
 	; found=$x echo \$\$BUILD | wc -w $x \\\\\\
 	; echo "MAKE \$\$HOST : \$\$found \$(PACKAGE)-\$(VERSION).tar.*" \\\\\\
-	; if test "\$\$found" = "0" ; then : \\\\\\
+	; if test "\$\$found" -eq "0" ; then : \\\\\\
 	; BUILD=$x grep "^#### .*|" Makefile |tail -1| sed -e 's/.*|//' $x \\\\\\
 	; fi ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\
 	; for f in \$\$i/\$(PACKAGE)-\$(VERSION).tar.* \\\\\\
@@ -229,7 +229,7 @@ dnl special rule add-on: "dist-foo" copies all the archives to $(PUB). (source t
 	; BUILD=$x grep "^#### \$\$HOST " Makefile | sed -e 's/.*|//' $x \\\\\\
 	; found=$x echo \$\$BUILD | wc -w $x \\\\\\
 	; echo "MAKE \$\$HOST : \$\$found \$(PACKAGE)-\$(VERSION).*" \\\\\\
-	; if test "\$\$found" = "0" ; then : \\\\\\
+	; if test "\$\$found" -eq "0" ; then : \\\\\\
 	; BUILD=$x grep "^#### .*|" Makefile |tail -1| sed -e 's/.*|//' $x \\\\\\
 	; fi ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\
 	; for f in \$\$i/\$(PACKAGE)-\$(VERSION).* \\\\\\
diff --git a/patches/bad-abi-fix b/patches/bad-abi-fix
index f190183..d30babb 100644
--- a/patches/bad-abi-fix
+++ b/patches/bad-abi-fix
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
 ===================================================================
 --- libffi.orig/ChangeLog
 +++ libffi/ChangeLog
-@@ -50,6 +50,23 @@
+@@ -55,6 +55,23 @@
  
  	* configure: Regenerate.
  
diff --git a/patches/darwin-EH-fix b/patches/darwin-EH-fix
index 7fee260..661bad5 100644
--- a/patches/darwin-EH-fix
+++ b/patches/darwin-EH-fix
@@ -28,7 +28,7 @@ Index: libffi/ChangeLog
 ===================================================================
 --- libffi.orig/ChangeLog
 +++ libffi/ChangeLog
-@@ -46,6 +46,11 @@
+@@ -51,6 +51,11 @@
  	Use them to handle ELF vs. ECOFF differences.
  	[__osf__] (_GLOBAL__F_ffi_call_osf): Define.
  
diff --git a/patches/fix-ppc32 b/patches/fix-ppc32
index a1973b7..ea44c30 100644
--- a/patches/fix-ppc32
+++ b/patches/fix-ppc32
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
 ===================================================================
 --- libffi.orig/ChangeLog
 +++ libffi/ChangeLog
-@@ -46,6 +46,11 @@
+@@ -51,6 +51,11 @@
  	Use them to handle ELF vs. ECOFF differences.
  	[__osf__] (_GLOBAL__F_ffi_call_osf): Define.
  
diff --git a/patches/fix_maxopt b/patches/fix_maxopt
index 3d4faf2..d8d8a9e 100644
--- a/patches/fix_maxopt
+++ b/patches/fix_maxopt
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
 ===================================================================
 --- libffi.orig/ChangeLog
 +++ libffi/ChangeLog
-@@ -46,6 +46,11 @@
+@@ -51,6 +51,11 @@
  	Use them to handle ELF vs. ECOFF differences.
  	[__osf__] (_GLOBAL__F_ffi_call_osf): Define.
  
diff --git a/patches/ios-fixes b/patches/ios-fixes
index 083f16f..be4166f 100644
--- a/patches/ios-fixes
+++ b/patches/ios-fixes
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
 ===================================================================
 --- libffi.orig/ChangeLog
 +++ libffi/ChangeLog
-@@ -87,7 +87,7 @@
+@@ -92,7 +92,7 @@
  	* src/prep_cif.c (UNLIKELY, LIKELY): Define.
  	(initialize_aggregate): Check for bad types.
  
diff --git a/patches/more-openbsd b/patches/more-openbsd
index 104d03e..f898f67 100644
--- a/patches/more-openbsd
+++ b/patches/more-openbsd
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
 ===================================================================
 --- libffi.orig/ChangeLog
 +++ libffi/ChangeLog
-@@ -789,6 +789,11 @@
+@@ -794,6 +794,11 @@
  	* man/Makefile.in: Regenerate.
  	* testsuite/Makefile.in: Regenerate.
  
diff --git a/patches/msvcc b/patches/msvcc
index 34f80cd..65f8e9c 100644
--- a/patches/msvcc
+++ b/patches/msvcc
@@ -19,7 +19,7 @@ Index: libffi/Makefile.in
 ===================================================================
 --- libffi.orig/Makefile.in
 +++ libffi/Makefile.in
-@@ -428,7 +428,9 @@ EXTRA_DIST = LICENSE ChangeLog.v1 Change
+@@ -441,7 +441,9 @@ EXTRA_DIST = LICENSE ChangeLog.v1 Change
  	src/frv/eabi.S src/frv/ffitarget.h src/dlmalloc.c \
  	src/moxie/ffi.c src/moxie/eabi.S libtool-version \
  	ChangeLog.libffi m4/libtool.m4 m4/lt~obsolete.m4 \
@@ -30,7 +30,7 @@ Index: libffi/Makefile.in
  
  info_TEXINFOS = doc/libffi.texi
  
-@@ -1818,7 +1820,6 @@ uninstall-am: uninstall-dvi-am uninstall
+@@ -1831,7 +1833,6 @@ uninstall-am: uninstall-dvi-am uninstall
  	uninstall-info-am uninstall-libLTLIBRARIES uninstall-pdf-am \
  	uninstall-pkgconfigDATA uninstall-ps-am
  
diff --git a/patches/ungccify b/patches/ungccify
index cfd7eb4..453f1d1 100644
--- a/patches/ungccify
+++ b/patches/ungccify
@@ -31,12 +31,13 @@ Index: libffi/Makefile.in
  subdir = .
  DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
  	$(srcdir)/Makefile.in $(srcdir)/doc/stamp-vti \
-@@ -76,7 +74,17 @@ DIST_COMMON = README $(am__configure_dep
+@@ -76,7 +74,18 @@ DIST_COMMON = README $(am__configure_dep
  	compile config.guess config.sub depcomp install-sh ltmain.sh \
  	mdate-sh missing texinfo.tex
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
-+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cc_maxopt.m4 \
++am__aclocal_m4_deps = $(top_srcdir)/m4/asmcfi.m4 \
++	$(top_srcdir)/m4/ax_cc_maxopt.m4 \
 +	$(top_srcdir)/m4/ax_cflags_warn_all.m4 \
 +	$(top_srcdir)/m4/ax_check_compiler_flags.m4 \
 +	$(top_srcdir)/m4/ax_compiler_vendor.m4 \
@@ -50,7 +51,7 @@ Index: libffi/Makefile.in
  	$(top_srcdir)/configure.ac
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  	$(ACLOCAL_M4)
-@@ -335,6 +343,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
+@@ -335,6 +344,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
  PACKAGE_URL = @PACKAGE_URL@
  PACKAGE_VERSION = @PACKAGE_VERSION@
  PATH_SEPARATOR = @PATH_SEPARATOR@
@@ -58,7 +59,7 @@ Index: libffi/Makefile.in
  RANLIB = @RANLIB@
  SED = @SED@
  SET_MAKE = @SET_MAKE@
-@@ -355,6 +364,7 @@ am__leading_dot = @am__leading_dot@
+@@ -355,6 +365,7 @@ am__leading_dot = @am__leading_dot@
  am__quote = @am__quote@
  am__tar = @am__tar@
  am__untar = @am__untar@
@@ -66,7 +67,7 @@ Index: libffi/Makefile.in
  bindir = @bindir@
  build = @build@
  build_alias = @build_alias@
-@@ -493,7 +503,7 @@ nodist_libffi_la_SOURCES = $(am__append_
+@@ -493,7 +504,7 @@ nodist_libffi_la_SOURCES = $(am__append_
  	$(am__append_27)
  libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
  nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
@@ -921,7 +922,7 @@ Index: libffi/m4/ax_enable_builddir.m4
 +	; test ".\$\$HOST" = "." && HOST=$x sh $AUX/config.guess $x \\\\\\
 +	; BUILD=$x grep "^#### \$\$HOST " Makefile | sed -e 's/.*|//' $x \\\\\\
 +	; use=$x basename "\$\@" _ALL $x; n=$x echo \$\$BUILD | wc -w $x \\\\\\
-+	; echo "MAKE \$\$HOST : \$\$n * \$\@"; if test "\$\$n" = "0" ; then : \\\\\\
++	; echo "MAKE \$\$HOST : \$\$n * \$\@"; if test "\$\$n" -eq "0" ; then : \\\\\\
 +	; BUILD=$x grep "^####.*|" Makefile |tail -1| sed -e 's/.*|//' $x ; fi \\\\\\
 +	; test ".\$\$BUILD" = "." && BUILD="." \\\\\\
 +	; test "\$\$use" = "\$\@" && BUILD=$x echo "\$\$BUILD" | tail -1 $x \\\\\\
@@ -934,7 +935,7 @@ Index: libffi/m4/ax_enable_builddir.m4
 +	; BUILD=$x grep "^#### \$\$HOST " Makefile | sed -e 's/.*|//' $x \\\\\\
 +	; found=$x echo \$\$BUILD | wc -w $x \\\\\\
 +	; echo "MAKE \$\$HOST : \$\$found \$(PACKAGE)-\$(VERSION).tar.*" \\\\\\
-+	; if test "\$\$found" = "0" ; then : \\\\\\
++	; if test "\$\$found" -eq "0" ; then : \\\\\\
 +	; BUILD=$x grep "^#### .*|" Makefile |tail -1| sed -e 's/.*|//' $x \\\\\\
 +	; fi ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\
 +	; for f in \$\$i/\$(PACKAGE)-\$(VERSION).tar.* \\\\\\
@@ -946,7 +947,7 @@ Index: libffi/m4/ax_enable_builddir.m4
 +	; BUILD=$x grep "^#### \$\$HOST " Makefile | sed -e 's/.*|//' $x \\\\\\
 +	; found=$x echo \$\$BUILD | wc -w $x \\\\\\
 +	; echo "MAKE \$\$HOST : \$\$found \$(PACKAGE)-\$(VERSION).*" \\\\\\
-+	; if test "\$\$found" = "0" ; then : \\\\\\
++	; if test "\$\$found" -eq "0" ; then : \\\\\\
 +	; BUILD=$x grep "^#### .*|" Makefile |tail -1| sed -e 's/.*|//' $x \\\\\\
 +	; fi ; for i in \$\$BUILD ; do test ".\$\$i" = "." && continue \\\\\\
 +	; for f in \$\$i/\$(PACKAGE)-\$(VERSION).* \\\\\\
diff --git a/src/closures.c b/src/closures.c
index 1b37827..b8392c8 100644
--- a/src/closures.c
+++ b/src/closures.c
@@ -172,7 +172,7 @@ selinux_enabled_check (void)
 
 #endif /* !FFI_MMAP_EXEC_SELINUX */
 
-#elif defined (__CYGWIN__) || defined(__INTERIX)
+#elif defined (__CYGWIN__)
 
 #include <sys/mman.h>