summaryrefslogtreecommitdiff
path: root/gr-audio-portaudio/autoconfiscate.patch
blob: fd7b9c3704a9a534c4dd1711d3273d20c90b0272 (plain)
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
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
Index: portaudio-2.0.pc.in
===================================================================
RCS file: /home/cvs/portaudio/Attic/portaudio-2.0.pc.in,v
retrieving revision 1.1.2.1
diff -u -b -B -w -p -r1.1.2.1 portaudio-2.0.pc.in
--- portaudio-2.0.pc.in	19 Mar 2006 13:02:36 -0000	1.1.2.1
+++ portaudio-2.0.pc.in	19 Mar 2006 22:26:01 -0000
@@ -9,4 +9,4 @@ Requires:
 Version: 19
 
 Libs: -L${libdir} -lportaudio @LIBS@
-Cflags: -I${includedir} @THREAD_CFLAGS@
+Cflags: -I${includedir} @PTHREAD_CFLAGS@
Index: pa_asio/iasiothiscallresolver.cpp
===================================================================
RCS file: /home/cvs/portaudio/pa_asio/Attic/iasiothiscallresolver.cpp,v
retrieving revision 1.1.2.4
diff -u -b -B -w -p -r1.1.2.4 iasiothiscallresolver.cpp
--- pa_asio/iasiothiscallresolver.cpp	10 Jul 2004 03:27:41 -0000	1.1.2.4
+++ pa_asio/iasiothiscallresolver.cpp	19 Mar 2006 22:26:03 -0000
@@ -152,6 +152,7 @@
     recent versions of the gcc assembler.
 */
 
+#include <config.h>
 
 // We only need IASIOThiscallResolver at all if we are on Win32. For other
 // platforms we simply bypass the IASIOThiscallResolver definition to allow us
Index: pa_asio/pa_asio.cpp
===================================================================
RCS file: /home/cvs/portaudio/pa_asio/pa_asio.cpp,v
retrieving revision 1.7.2.68
diff -u -b -B -w -p -r1.7.2.68 pa_asio.cpp
--- pa_asio/pa_asio.cpp	5 Dec 2005 04:55:28 -0000	1.7.2.68
+++ pa_asio/pa_asio.cpp	19 Mar 2006 22:26:14 -0000
@@ -106,7 +106,7 @@
         must be closed).
 */
 
-
+#include <config.h>
 
 #include <stdio.h>
 #include <assert.h>
Index: pa_common/pa_allocation.c
===================================================================
RCS file: /home/cvs/portaudio/pa_common/Attic/pa_allocation.c,v
retrieving revision 1.1.2.6
diff -u -b -B -w -p -r1.1.2.6 pa_allocation.c
--- pa_common/pa_allocation.c	20 Dec 2004 12:07:51 -0000	1.1.2.6
+++ pa_common/pa_allocation.c	19 Mar 2006 22:26:15 -0000
@@ -35,6 +35,8 @@
 */
 
 
+#include <config.h>
+
 #include "pa_allocation.h"
 #include "pa_util.h"
 
Index: pa_common/pa_converters.c
===================================================================
RCS file: /home/cvs/portaudio/pa_common/Attic/pa_converters.c,v
retrieving revision 1.1.2.27
diff -u -b -B -w -p -r1.1.2.27 pa_converters.c
--- pa_common/pa_converters.c	2 Nov 2005 12:14:07 -0000	1.1.2.27
+++ pa_common/pa_converters.c	19 Mar 2006 22:26:23 -0000
@@ -49,6 +49,8 @@
 */
 
 
+#include <config.h>
+
 #include "pa_converters.h"
 #include "pa_dither.h"
 #include "pa_endianness.h"
Index: pa_common/pa_cpuload.c
===================================================================
RCS file: /home/cvs/portaudio/pa_common/Attic/pa_cpuload.c,v
retrieving revision 1.1.2.14
diff -u -b -B -w -p -r1.1.2.14 pa_cpuload.c
--- pa_common/pa_cpuload.c	8 Jan 2004 22:01:12 -0000	1.1.2.14
+++ pa_common/pa_cpuload.c	19 Mar 2006 22:26:24 -0000
@@ -41,6 +41,8 @@
 */
 
 
+#include <config.h>
+
 #include "pa_cpuload.h"
 
 #include <assert.h>
Index: pa_common/pa_dither.c
===================================================================
RCS file: /home/cvs/portaudio/pa_common/Attic/pa_dither.c,v
retrieving revision 1.1.2.6
diff -u -b -B -w -p -r1.1.2.6 pa_dither.c
--- pa_common/pa_dither.c	28 May 2005 22:49:02 -0000	1.1.2.6
+++ pa_common/pa_dither.c	19 Mar 2006 22:26:24 -0000
@@ -34,6 +34,8 @@
 */
 
 
+#include <config.h>
+
 #include "pa_dither.h"
 #include "pa_types.h"
 
Index: pa_common/pa_front.c
===================================================================
RCS file: /home/cvs/portaudio/pa_common/Attic/pa_front.c,v
retrieving revision 1.1.2.52
diff -u -b -B -w -p -r1.1.2.52 pa_front.c
--- pa_common/pa_front.c	7 Dec 2005 20:10:34 -0000	1.1.2.52
+++ pa_common/pa_front.c	19 Mar 2006 22:26:30 -0000
@@ -89,6 +89,8 @@ enquire about status on the PortAudio ma
 */
 
 
+#include <config.h>
+
 #include <stdio.h>
 #include <stdarg.h>
 #include <memory.h>
Index: pa_common/pa_process.c
===================================================================
RCS file: /home/cvs/portaudio/pa_common/Attic/pa_process.c,v
retrieving revision 1.1.2.51
diff -u -b -B -w -p -r1.1.2.51 pa_process.c
--- pa_common/pa_process.c	27 Oct 2005 23:28:48 -0000	1.1.2.51
+++ pa_common/pa_process.c	19 Mar 2006 22:26:35 -0000
@@ -72,6 +72,8 @@
 */
 
 
+#include <config.h>
+
 #include <assert.h>
 #include <string.h> /* memset() */
 
Index: pa_common/pa_skeleton.c
===================================================================
RCS file: /home/cvs/portaudio/pa_common/Attic/pa_skeleton.c,v
retrieving revision 1.1.2.39
diff -u -b -B -w -p -r1.1.2.39 pa_skeleton.c
--- pa_common/pa_skeleton.c	26 Nov 2003 14:56:09 -0000	1.1.2.39
+++ pa_common/pa_skeleton.c	19 Mar 2006 22:26:38 -0000
@@ -40,6 +40,8 @@
 */
 
 
+#include <config.h>
+
 #include <string.h> /* strlen() */
 
 #include "pa_util.h"
Index: pa_common/pa_stream.c
===================================================================
RCS file: /home/cvs/portaudio/pa_common/Attic/pa_stream.c,v
retrieving revision 1.1.2.12
diff -u -b -B -w -p -r1.1.2.12 pa_stream.c
--- pa_common/pa_stream.c	20 Sep 2003 21:31:00 -0000	1.1.2.12
+++ pa_common/pa_stream.c	19 Mar 2006 22:26:39 -0000
@@ -36,6 +36,8 @@
 */
 
 
+#include <config.h>
+
 #include "pa_stream.h"
 
 
Index: pa_common/pa_trace.c
===================================================================
RCS file: /home/cvs/portaudio/pa_common/pa_trace.c,v
retrieving revision 1.1.1.1.2.4
diff -u -b -B -w -p -r1.1.1.1.2.4 pa_trace.c
--- pa_common/pa_trace.c	2 Nov 2005 12:06:44 -0000	1.1.1.1.2.4
+++ pa_common/pa_trace.c	19 Mar 2006 22:26:39 -0000
@@ -35,6 +35,8 @@
 */
 
 
+#include <config.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
Index: pa_jack/pa_jack.c
===================================================================
RCS file: /home/cvs/portaudio/pa_jack/Attic/pa_jack.c,v
retrieving revision 1.1.2.20
diff -u -b -B -w -p -r1.1.2.20 pa_jack.c
--- pa_jack/pa_jack.c	2 Oct 2005 22:02:26 -0000	1.1.2.20
+++ pa_jack/pa_jack.c	19 Mar 2006 22:26:46 -0000
@@ -35,6 +35,8 @@
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include <config.h>
+
 #include <string.h>
 #include <regex.h>
 #include <stdlib.h>
@@ -56,7 +58,7 @@
 #include "pa_process.h"
 #include "pa_allocation.h"
 #include "pa_cpuload.h"
-#include "../pablio/ringbuffer.c"
+#include "pablio/ringbuffer.c"
 
 static int aErr_;
 static PaError paErr_;     /* For use with ENSURE_PA */
Index: pa_linux_alsa/pa_linux_alsa.c
===================================================================
RCS file: /home/cvs/portaudio/pa_linux_alsa/Attic/pa_linux_alsa.c,v
retrieving revision 1.1.2.90
diff -u -b -B -w -p -r1.1.2.90 pa_linux_alsa.c
--- pa_linux_alsa/pa_linux_alsa.c	19 Mar 2006 12:28:44 -0000	1.1.2.90
+++ pa_linux_alsa/pa_linux_alsa.c	19 Mar 2006 22:27:00 -0000
@@ -34,6 +34,8 @@
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include <config.h>
+
 #define ALSA_PCM_NEW_HW_PARAMS_API
 #define ALSA_PCM_NEW_SW_PARAMS_API
 #include <alsa/asoundlib.h>
Index: pa_mac/pa_mac_hostapis.c
===================================================================
RCS file: /home/cvs/portaudio/pa_mac/Attic/pa_mac_hostapis.c,v
retrieving revision 1.1.2.1
diff -u -b -B -w -p -r1.1.2.1 pa_mac_hostapis.c
--- pa_mac/pa_mac_hostapis.c	27 May 2004 22:39:58 -0000	1.1.2.1
+++ pa_mac/pa_mac_hostapis.c	19 Mar 2006 22:27:00 -0000
@@ -33,6 +33,7 @@
 Mac OS host API initialization function table.
 */
 
+#include <config.h>
 
 #include "pa_hostapi.h"
 
Index: pa_mac_core/pa_mac_core.c
===================================================================
RCS file: /home/cvs/portaudio/pa_mac_core/pa_mac_core.c,v
retrieving revision 1.8.2.11
diff -u -b -B -w -p -r1.8.2.11 pa_mac_core.c
--- pa_mac_core/pa_mac_core.c	27 Feb 2006 14:25:50 -0000	1.8.2.11
+++ pa_mac_core/pa_mac_core.c	19 Mar 2006 22:27:08 -0000
@@ -45,6 +45,8 @@
  @brief AUHAL implementation of PortAudio
 */
 
+#include <config.h>
+
 #include <string.h> /* strlen(), memcmp() etc. */
 
 #include <AudioUnit/AudioUnit.h>
Index: pa_mac_core/pa_mac_core_old.c
===================================================================
RCS file: /home/cvs/portaudio/pa_mac_core/Attic/pa_mac_core_old.c,v
retrieving revision 1.1.2.1
diff -u -b -B -w -p -r1.1.2.1 pa_mac_core_old.c
--- pa_mac_core/pa_mac_core_old.c	24 Dec 2005 01:22:52 -0000	1.1.2.1
+++ pa_mac_core/pa_mac_core_old.c	19 Mar 2006 22:27:14 -0000
@@ -34,6 +34,8 @@
  *
  */
 
+#include <config.h>
+
 #include <CoreAudio/CoreAudio.h>
 #include <AudioToolbox/AudioToolbox.h>
 #include <stdio.h>
Index: pa_mac_core/pa_mac_core_utilities.c
===================================================================
RCS file: /home/cvs/portaudio/pa_mac_core/Attic/pa_mac_core_utilities.c,v
retrieving revision 1.1.2.2
diff -u -b -B -w -p -r1.1.2.2 pa_mac_core_utilities.c
--- pa_mac_core/pa_mac_core_utilities.c	9 Dec 2005 19:43:14 -0000	1.1.2.2
+++ pa_mac_core/pa_mac_core_utilities.c	19 Mar 2006 22:27:14 -0000
@@ -10,6 +10,8 @@
  * by Bjorn Roche.
  */
 
+#include <config.h>
+
 /*
  * Translates MacOS generated errors into PaErrors
  */
Index: pa_mac_sm/pa_mac_sm.c
===================================================================
RCS file: /home/cvs/portaudio/pa_mac_sm/Attic/pa_mac_sm.c,v
retrieving revision 1.1.2.1
diff -u -b -B -w -p -r1.1.2.1 pa_mac_sm.c
--- pa_mac_sm/pa_mac_sm.c	7 Jun 2002 21:20:48 -0000	1.1.2.1
+++ pa_mac_sm/pa_mac_sm.c	19 Mar 2006 22:27:21 -0000
@@ -76,6 +76,8 @@ O- Add support for native sample data fo
 O- Review buffer sizing. Should it be based on result of siDeviceBufferInfo query?
 O- Determine default devices somehow.
 */
+#include <config.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
Index: pa_sgi/pa_sgi.c
===================================================================
RCS file: /home/cvs/portaudio/pa_sgi/pa_sgi.c,v
retrieving revision 1.2.2.20
diff -u -b -B -w -p -r1.2.2.20 pa_sgi.c
--- pa_sgi/pa_sgi.c	3 Jan 2004 19:20:09 -0000	1.2.2.20
+++ pa_sgi/pa_sgi.c	19 Mar 2006 22:27:27 -0000
@@ -123,6 +123,8 @@
        a outputs stereo. One can observe this in SGI's 'Audio Queue Monitor'.
 */
 
+#include <config.h>
+
 #include <string.h>         /* For strlen() but also for strerror()! */
 #include <stdio.h>          /* printf() */
 #include <math.h>           /* fabs()   */
Index: pa_unix/pa_unix_hostapis.c
===================================================================
RCS file: /home/cvs/portaudio/pa_unix/Attic/pa_unix_hostapis.c,v
retrieving revision 1.1.2.5
diff -u -b -B -w -p -r1.1.2.5 pa_unix_hostapis.c
--- pa_unix/pa_unix_hostapis.c	2 Oct 2003 12:35:46 -0000	1.1.2.5
+++ pa_unix/pa_unix_hostapis.c	19 Mar 2006 22:27:28 -0000
@@ -30,6 +30,8 @@
  */
 
 
+#include <config.h>
+
 #include "pa_hostapi.h"
 
 PaError PaJack_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
Index: pa_unix/pa_unix_util.c
===================================================================
RCS file: /home/cvs/portaudio/pa_unix/Attic/pa_unix_util.c,v
retrieving revision 1.1.2.8
diff -u -b -B -w -p -r1.1.2.8 pa_unix_util.c
--- pa_unix/pa_unix_util.c	20 Nov 2005 13:46:13 -0000	1.1.2.8
+++ pa_unix/pa_unix_util.c	19 Mar 2006 22:27:28 -0000
@@ -31,6 +31,8 @@
  */
 
  
+#include <config.h>
+
 #include <pthread.h>
 #include <unistd.h>
 #include <stdlib.h>
Index: pa_unix_oss/pa_unix_oss.c
===================================================================
RCS file: /home/cvs/portaudio/pa_unix_oss/pa_unix_oss.c,v
retrieving revision 1.6.2.27
diff -u -b -B -w -p -r1.6.2.27 pa_unix_oss.c
--- pa_unix_oss/pa_unix_oss.c	21 Feb 2006 19:13:56 -0000	1.6.2.27
+++ pa_unix_oss/pa_unix_oss.c	19 Mar 2006 22:27:35 -0000
@@ -35,6 +35,8 @@
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include <config.h>
+
 #include <stdio.h>
 #include <string.h>
 #include <math.h>
@@ -42,7 +44,6 @@
 #include <sys/ioctl.h>
 #include <unistd.h>
 #include <pthread.h>
-#include <alloca.h>
 #include <malloc.h>
 #include <assert.h>
 #include <errno.h>
@@ -52,14 +53,21 @@
 #include <limits.h>
 #include <semaphore.h>
 
-#ifdef __FreeBSD__
+#ifdef HAVE_SYS_SOUNDCARD_H
 # include <sys/soundcard.h>
+#elif HAVE_LINUX_SOUNDCARD_H
+# include <linux/soundcard.h>
+#elif HAVE_SOUNDCARD_H
+# include <soundcard.h>
+#else
+# include <machine/soundcard.h> /* JH20010905 */
+#endif
+
+#ifdef __FreeBSD__
 # define DEVICE_NAME_BASE            "/dev/dsp"
 #elif defined __linux__
-# include <linux/soundcard.h>
 # define DEVICE_NAME_BASE            "/dev/dsp"
 #else
-# include <machine/soundcard.h> /* JH20010905 */
 # define DEVICE_NAME_BASE            "/dev/audio"
 #endif
 
@@ -1913,7 +1921,12 @@ static signed long GetStreamWriteAvailab
     PaOssStream *stream = (PaOssStream*)s;
     int delay = 0;
 
+/*
+ * FIXME: SNDCTL_DSP_GETODELAY does not exist on NetBSD
+ */
+#ifdef SNDCTL_DSP_GETODELAY
     if( ioctl( stream->playback->fd, SNDCTL_DSP_GETODELAY, &delay ) < 0 )
+#endif
         return paUnanticipatedHostError;
     
     return (PaOssStreamComponent_BufferSize( stream->playback ) - delay) / PaOssStreamComponent_FrameSize( stream->playback );
Index: pa_unix_oss/recplay.c
===================================================================
RCS file: /home/cvs/portaudio/pa_unix_oss/recplay.c,v
retrieving revision 1.1.1.1
diff -u -b -B -w -p -r1.1.1.1 recplay.c
--- pa_unix_oss/recplay.c	22 Jan 2002 00:52:44 -0000	1.1.1.1
+++ pa_unix_oss/recplay.c	19 Mar 2006 22:27:35 -0000
@@ -4,6 +4,8 @@
  * Minimal record and playback test.
  * 
  */
+#include <config.h>
+
 #include <stdio.h>
 #include <unistd.h>
 #include <stdlib.h>
Index: pa_win/pa_win_hostapis.c
===================================================================
RCS file: /home/cvs/portaudio/pa_win/Attic/pa_win_hostapis.c,v
retrieving revision 1.1.2.10
diff -u -b -B -w -p -r1.1.2.10 pa_win_hostapis.c
--- pa_win/pa_win_hostapis.c	8 Sep 2004 17:31:37 -0000	1.1.2.10
+++ pa_win/pa_win_hostapis.c	19 Mar 2006 22:27:36 -0000
@@ -36,6 +36,7 @@
     the Unix version does, we should consider being consistent.
 */
 
+#include <config.h>
 
 #include "pa_hostapi.h"
 
Index: pa_win/pa_win_util.c
===================================================================
RCS file: /home/cvs/portaudio/pa_win/Attic/pa_win_util.c,v
retrieving revision 1.1.2.7
diff -u -b -B -w -p -r1.1.2.7 pa_win_util.c
--- pa_win/pa_win_util.c	15 Sep 2003 18:30:26 -0000	1.1.2.7
+++ pa_win/pa_win_util.c	19 Mar 2006 22:27:36 -0000
@@ -37,6 +37,9 @@
     bug. (see msdn kb Q274323).
 */
  
+#include <config.h>
+
+
 #include <windows.h>
 #include <mmsystem.h> /* for timeGetTime() */
 
Index: pa_win/pa_x86_plain_converters.c
===================================================================
RCS file: /home/cvs/portaudio/pa_win/Attic/pa_x86_plain_converters.c,v
retrieving revision 1.1.2.2
diff -u -b -B -w -p -r1.1.2.2 pa_x86_plain_converters.c
--- pa_win/pa_x86_plain_converters.c	28 Feb 2003 01:49:59 -0000	1.1.2.2
+++ pa_win/pa_x86_plain_converters.c	19 Mar 2006 22:27:40 -0000
@@ -1,3 +1,5 @@
+#include <config.h>
+
 #include "pa_x86_plain_converters.h"
 
 #include "pa_converters.h"
Index: pa_win_ds/dsound_wrapper.c
===================================================================
RCS file: /home/cvs/portaudio/pa_win_ds/dsound_wrapper.c,v
retrieving revision 1.1.1.1.2.11
diff -u -b -B -w -p -r1.1.1.1.2.11 dsound_wrapper.c
--- pa_win_ds/dsound_wrapper.c	7 Sep 2003 13:04:53 -0000	1.1.1.1.2.11
+++ pa_win_ds/dsound_wrapper.c	19 Mar 2006 22:27:43 -0000
@@ -33,6 +33,8 @@
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  *
  */
+#include <config.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <math.h>
Index: pa_win_ds/pa_win_ds.c
===================================================================
RCS file: /home/cvs/portaudio/pa_win_ds/Attic/pa_win_ds.c,v
retrieving revision 1.1.2.51
diff -u -b -B -w -p -r1.1.2.51 pa_win_ds.c
--- pa_win_ds/pa_win_ds.c	26 Jan 2006 01:13:18 -0000	1.1.2.51
+++ pa_win_ds/pa_win_ds.c	19 Mar 2006 22:27:49 -0000
@@ -58,6 +58,8 @@
         O- fix "patest_stop.c"
 */
 
+#include <config.h>
+
 #include <stdio.h>
 #include <string.h> /* strlen() */
 
Index: pa_win_wdmks/pa_win_wdmks.c
===================================================================
RCS file: /home/cvs/portaudio/pa_win_wdmks/Attic/pa_win_wdmks.c,v
retrieving revision 1.1.2.4
diff -u -b -B -w -p -r1.1.2.4 pa_win_wdmks.c
--- pa_win_wdmks/pa_win_wdmks.c	19 Nov 2005 10:14:01 -0000	1.1.2.4
+++ pa_win_wdmks/pa_win_wdmks.c	19 Mar 2006 22:28:00 -0000
@@ -42,6 +42,8 @@
  of a device for the duration of active stream using those devices
 */
 
+#include <config.h>
+
 #include <stdio.h>
 
 /* Debugging/tracing support */
Index: pa_win_wmme/pa_win_wmme.c
===================================================================
RCS file: /home/cvs/portaudio/pa_win_wmme/pa_win_wmme.c,v
retrieving revision 1.6.2.88
diff -u -b -B -w -p -r1.6.2.88 pa_win_wmme.c
--- pa_win_wmme/pa_win_wmme.c	16 Feb 2006 01:56:45 -0000	1.6.2.88
+++ pa_win_wmme/pa_win_wmme.c	19 Mar 2006 22:28:14 -0000
@@ -100,6 +100,8 @@ Non-critical stuff for the future:
     Events (when necessary) inside the ReadStream() and WriteStream() functions.
 */
 
+#include <config.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <math.h>
--- /dev/null	2006-03-10 00:02:48.821312048 +0100
+++ Makefile.am	2006-03-19 22:49:42.000000000 +0100
@@ -0,0 +1,215 @@
+#
+# PortAudio V19 Makefile.am
+#
+# Stéphane Fillod
+#
+
+INCLUDES = -I$(top_srcdir)/pa_common
+
+COMMON_SRC = \
+	pa_common/pa_allocation.c \
+	pa_common/pa_converters.c \
+	pa_common/pa_cpuload.c \
+	pa_common/pa_dither.c \
+	pa_common/pa_front.c \
+	pa_common/pa_process.c \
+	pa_common/pa_skeleton.c \
+	pa_common/pa_stream.c \
+	pa_common/pa_trace.c
+
+libportaudio_coreaudio_la_SOURCES = \
+	pa_mac/pa_mac_hostapis.c \
+	pa_mac_core/pa_mac_core.c
+	
+libportaudio_mac_asio_la_SOURCES = \
+	pa_asio/iasiothiscallresolver.cpp
+libportaudio_mac_asio_la_LIBADD = @ASIO_OBJS@
+
+libportaudio_dsound_la_SOURCES = \
+	pa_win_ds/pa_win_ds.c \
+	pa_win_ds/dsound_wrapper.c \
+	pa_win/pa_win_hostapis.c \
+	pa_win/pa_win_util.c
+
+libportaudio_win_asio_la_SOURCES = \
+	pa_asio/pa_asio.cpp \
+	pa_win/pa_win_hostapis.c \
+	pa_win/pa_win_util.c \
+	pa_asio/iasiothiscallresolver.cpp 
+libportaudio_win_asio_la_LIBADD = @ASIO_OBJS@
+
+libportaudio_wdmks_la_SOURCES = \
+	pa_win_wdmks/pa_win_wdmks.c \
+	pa_win/pa_win_hostapis.c \
+	pa_win/pa_win_util.c
+
+libportaudio_wmme_la_SOURCES = \
+	pa_win_wmme/pa_win_wmme.c \
+	pa_win/pa_win_hostapis.c \
+       	pa_win/pa_win_util.c
+
+libportaudio_sgi_la_SOURCES = \
+	pa_sgi/pa_sgi.c
+
+libportaudio_alsa_la_SOURCES = \
+	pa_linux_alsa/pa_linux_alsa.c
+
+libportaudio_jack_la_SOURCES = \
+	pa_jack/pa_jack.c
+
+libportaudio_oss_la_SOURCES = \
+	pa_unix_oss/pa_unix_oss.c
+
+libportaudio_unix_la_SOURCES = \
+	pa_unix/pa_unix_hostapis.c \
+	pa_unix/pa_unix_util.c
+
+EXTRA_LTLIBRARIES = \
+	libportaudio-coreaudio.la \
+	libportaudio-mac-asio.la \
+	libportaudio-dsound.la \
+	libportaudio-win-asio.la \
+	libportaudio-wdmks.la \
+	libportaudio-wmme.la \
+	libportaudio-sgi.la \
+	libportaudio-alsa.la \
+	libportaudio-jack.la \
+	libportaudio-oss.la \
+	libportaudio-unix.la
+
+noinst_LTLIBRARIES = @PA_LIBADD@
+lib_LTLIBRARIES = libportaudio.la
+
+
+libportaudio_la_SOURCES = \
+	$(COMMON_SRC)
+
+# -no-undefined is required by Win32 and MacOSX, should be harmless otherwise
+libportaudio_la_LDFLAGS = $(WINLDFLAGS) -no-undefined -version-info @PA_ABI@:@PA_REV@:@PA_AGE@
+libportaudio_la_CFLAGS = $(AM_CFLAGS)
+libportaudio_la_LIBADD = @PA_LIBADD@ -lm
+libportaudio_la_DEPENDENCIES = @PA_LIBADD@
+
+
+noinst_HEADERS =  \
+	pa_asio/iasiothiscallresolver.h \
+	pa_asio/pa_asio.h \
+	pa_beos/PlaybackNode.h \
+	pablio/pablio.h \
+	pablio/ringbuffer.h \
+	pa_common/pa_allocation.h \
+	pa_common/pa_converters.h \
+	pa_common/pa_cpuload.h \
+	pa_common/pa_dither.h \
+	pa_common/pa_endianness.h \
+	pa_common/pa_hostapi.h \
+	pa_common/pa_process.h \
+	pa_common/pa_stream.h \
+	pa_common/pa_trace.h \
+	pa_common/pa_types.h \
+	pa_common/pa_util.h \
+	pa_dll_switch/PaDllEntry.h \
+	pa_dll_switch/portaudio.h \
+	pa_linux_alsa/pa_linux_alsa.h \
+	pa_mac_core/pa_mac_core.h \
+	pa_unix/pa_unix_util.h \
+	pa_win_ds/dsound_wrapper.h \
+	pa_win/pa_x86_plain_converters.h \
+	pa_win_wmme/pa_win_wmme.h
+
+include_HEADERS = \
+	pa_common/portaudio.h
+
+
+TESTS = \
+	pa_tests/paqa_errs \
+	pa_tests/patest1 \
+	pa_tests/patest_buffer \
+	pa_tests/patest_callbackstop \
+	pa_tests/patest_clip \
+	pa_tests/patest_dither \
+	pa_tests/patest_hang \
+	pa_tests/patest_in_overflow \
+	pa_tests/patest_latency \
+	pa_tests/patest_leftright \
+	pa_tests/patest_longsine \
+	pa_tests/patest_many \
+	pa_tests/patest_maxsines \
+	pa_tests/patest_multi_sine \
+	pa_tests/patest_out_underflow \
+	pa_tests/patest_pink \
+	pa_tests/patest_prime \
+	pa_tests/patest_read_record \
+	pa_tests/patest_record \
+	pa_tests/patest_ringmix \
+	pa_tests/patest_saw \
+	pa_tests/patest_sine8 \
+	pa_tests/patest_sine \
+	pa_tests/patest_sine_formats \
+	pa_tests/patest_sine_time \
+	pa_tests/patest_start_stop \
+	pa_tests/patest_stop \
+	pa_tests/patest_sync \
+	pa_tests/patest_toomanysines \
+	pa_tests/patest_underflow \
+	pa_tests/patest_wire \
+	pa_tests/patest_write_sine \
+	pa_tests/pa_devs \
+	pa_tests/pa_fuzz \
+	pa_tests/pa_minlat \
+	pa_tests/paqa_devs
+
+check_PROGRAMS = $(TESTS)
+
+LDADD = libportaudio.la
+
+# Most of these don't compile yet.  Put them in TESTS, above, if
+# you want to try to compile them...
+ALL_TESTS = \
+	pa_tests/debug_convert \
+	pa_tests/debug_dither_calc \
+	pa_tests/debug_dual \
+	pa_tests/debug_multi_in \
+	pa_tests/debug_multi_out \
+	pa_tests/debug_record \
+	pa_tests/debug_record_reuse \
+	pa_tests/debug_sine_amp \
+	pa_tests/debug_sine \
+	pa_tests/debug_sine_formats \
+	pa_tests/debug_srate \
+	pa_tests/debug_test1 \
+	$(TESTS) 
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = portaudio-2.0.pc
+
+
+SUBDIRS=
+DIST_SUBDIRS=
+
+ACLOCAL_AMFLAGS = -I config
+
+doc: config.doxy
+	doxygen config.doxy
+
+# pa_asio pa_beos pablio pa_common pa_dll_switch pa_jack pa_linux_alsa pa_mac pa_mac_core pa_mac_sm pa_sgi pa_tests pa_unix pa_unix_oss pa_win pa_win_ds pa_win_wdmks pa_win_wmme
+
+PABLIO = \
+	pablio/pablio.def \
+	pablio/README.txt \
+	pablio/ringbuffer.h \
+	pablio/test_rw_echo.c \
+	pablio/test_w_saw.c \
+	pablio/pablio.c \
+	pablio/pablio.h \
+	pablio/ringbuffer.c \
+	pablio/test_rw.c \
+	pablio/test_w_saw8.c
+
+EXTRA_DIST =  \
+	$(PABLIO) \
+	config.doxy \
+	LICENSE.txt \
+	README.txt \
+	portaudio-2.0.pc.in \
+	V19-devel-readme.txt
--- /dev/null	2006-03-10 00:02:48.821312048 +0100
+++ configure.ac	2006-03-19 22:49:13.000000000 +0100
@@ -0,0 +1,278 @@
+dnl
+dnl portaudio V19 configure.ac script
+dnl
+dnl Stephane Fillod, Dominic Mazzoni, Arve Knudsen
+dnl
+
+dnl Require autoconf >= 2.57
+AC_PREREQ(2.57)
+
+dnl Init autoconf and make sure configure is being called
+dnl from the right directory
+AC_INIT([portaudio], [2.0cvs], [portaudio@techweb.rfa.org])
+AC_CONFIG_SRCDIR([pa_common/portaudio.h])
+AC_CONFIG_HEADERS(config.h)
+AC_CANONICAL_TARGET([])
+
+dnl Automake Initialisation.
+AM_INIT_AUTOMAKE(AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION, -)
+AM_MAINTAINER_MODE
+
+dnl Portaudio library interface version, see libtool(info), esp.
+dnl node 6.3 "Updating version info"
+PA_ABI=19
+PA_REV=0
+PA_AGE=0
+AC_SUBST(PA_ABI)
+AC_SUBST(PA_REV)
+AC_SUBST(PA_AGE)
+
+
+dnl Checks for programs.
+
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_RANLIB
+AC_PROG_INSTALL
+AC_PROG_MAKE_SET
+
+AC_AIX
+AC_ISC_POSIX
+AC_MINIX
+AM_PROG_CC_STDC
+AC_PROG_GCC_TRADITIONAL
+AC_C_CONST
+AC_C_INLINE
+
+dnl Check for Mingw support
+#GR_PWIN32
+
+dnl libtool Initialisation
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
+
+ACX_PTHREAD
+
+dnl This must be one of the first tests we do or it will fail...
+AC_C_BIGENDIAN
+
+dnl checks for various host APIs and arguments to configure that
+dnl turn them on or off
+
+AC_CHECK_LIB(asound, snd_pcm_open, [have_alsa=yes], [have_alsa=no])
+
+
+PKG_CHECK_MODULES(JACK, jack, [have_jack=yes], [have_jack=no])
+PKG_CHECK_LIB(jack_client_new, [$JACK_LIBS], [$JACK_CFLAGS], [have_jack=yes], [have_jack=no])
+
+AC_CHECK_HEADERS([sys/soundcard.h linux/soundcard.h soundcard.h machine/soundcard.h])
+AC_CHECK_HEADERS(sys/ioctl.h, [have_oss=yes], [have_oss=no])
+
+dnl sizeof checks: we will need a 16-bit and a 32-bit type
+
+AC_CHECK_SIZEOF(short)
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(long)
+
+dnl Specify options
+
+AC_ARG_WITH(alsa, 
+            [  --with-alsa (default=yes)],
+            [with_alsa=$withval], [with_alsa=$have_alsa])
+
+AC_ARG_WITH(jack, 
+            [  --with-jack (default=yes)],
+            [with_jack=$withval], [with_jack=$have_jack])
+
+AC_ARG_WITH(oss, 
+            [  --with-oss (default=yes)],
+            [with_oss=$withval], [with_oss=$have_oss])
+
+AC_ARG_WITH(winapi,
+            [  --with-winapi ((wmme/directx/asio) default=wmme)],
+            [with_winapi=$withval], [with_winapi="wmme"])
+
+dnl Mac API added for ASIO, can have other api's listed
+AC_ARG_WITH(macapi,
+            [  --with-macapi ((asio/core/sm) default=core)],
+            [with_macapi=$withval], [with_macapi="core"])
+
+AC_ARG_WITH(asiodir,
+            [  --with-asiodir (default=/usr/local/asiosdk2)],
+            [with_asiodir=$withval], [with_asiodir="/usr/local/asiosdk2"])
+
+AC_ARG_WITH(dxdir,
+            [  --with-dxdir (default=/usr/local/dx7sdk)],
+            [with_dxdir=$withval], [with_dxdir="/usr/local/dx7sdk"])
+
+AC_ARG_ENABLE(debug-output,
+	[  --enable-debug-output],
+        [if test x$enableval != xno ; then
+	     AC_DEFINE(PA_ENABLE_DEBUG_OUTPUT,,[Enable debugging messages])
+          fi
+        ])
+
+dnl BSD configuration
+AC_HAVE_LIBRARY(ossaudio)
+
+dnl Mac OS X configuration
+
+AC_CHECK_LIB(CoreAudio, OpenAComponent,
+	    [ 
+	     have_coreaudio=yes
+	     PA_LIBADD="$PA_LIBADD libportaudio-coreaudio.la"
+	     AC_DEFINE([PA_USE_COREAUDIO], [], [Define to use Mac OS X CoreAudio])
+	     #LIBS="-framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon"
+	     LIBS="-lCoreAudio -lAudioToolbox -lAudioUnit -lCarbon"
+	    ], have_coreaudio=no)
+
+ASIO_CFLAGS=""
+ASIO_OBJS=""
+
+if [[ $with_asiodir ]] ; then
+  ASIODIR="$with_asiodir"
+fi
+
+if [[ $with_macapi = "asio" ]] ; then
+  echo "ASIODIR: $ASIODIR"
+  ASIO_CFLAGS="-Ipa_asio -I$ASIDIR/host/mac -I$ASIODIR/common"
+  ASIO_OBJS=$ASIODIR/common/asio.o $ASIODIR/host/asiodrivers.o $ASIODIR/host/mac/asioshlib.o
+  PA_LIBADD="$PA_LIBADD libportaudio-mac-asio.la"
+fi
+
+if [[ $with_winapi = "asio" ]] ; then
+  echo "ASIODIR: $ASIODIR"
+  ASIO_CFLAGS="-ffast-math -fomit-frame-pointer -Ipa_asio -I$ASIDIR/host/pc -I$ASIODIR/common -I$ASIODIR/host -DPA_NO_WMME -DPA_NO_DS -DPA_NO_WDMKS -DWINDOWS"
+  ASIO_OBJS=$ASIODIR/common/asio.o $ASIODIR/host/asiodrivers.o $ASIODIR/host/pc/asiolist.o
+  LIBS="$LIBS -lwinmm -lole32 -luuid"
+  PA_LIBADD="$PA_LIBADD libportaudio-win-asio.la"
+fi
+
+
+dnl MingW/Win configuration
+
+AC_TRY_LINK_LIB(dsound, [DSW_InitOutputBuffer(0,0,0,0);], [
+		#include <windows.h>
+		#include <DSound.h>
+		], [-I$DXDIR/include],
+	    [ 
+	     have_directx=yes
+	     DXDIR="$with_dxdir"
+             echo "DXDIR: $DXDIR"
+	     # LDFLAGS -L./dx7sdk/lib  ?
+             LIBS="-lwinmm -ldsound -lole32"
+             CFLAGS="$CFLAGS -I$DXDIR/include -DPA_NO_WMME -DPA_NO_ASIO -DPA_NO_WDMKS"
+	     PA_LIBADD="$PA_LIBADD libportaudio-dsound.la"
+	    ], have_directx=no)
+
+AC_TRY_LINK_LIB(kernel32, [DeviceIoControl(0,0,0,0,0,0,0,0);],[
+		#include <windows.h>
+		#include <winbase.h>
+		#include <ks.h>
+		], [-I$DXDIR/include],
+	    [ 
+	     have_wdmks=yes
+	     DXDIR="$with_dxdir"
+             echo "DXDIR: $DXDIR"
+	     # LDFLAGS -L./dx7sdk/lib  ?
+             LIBS="-lwinmm -luuid -lsetupapi -lole32"
+             CFLAGS="$CFLAGS -I$DXDIR/include -DPA_NO_WMME -DPA_NO_DS -DPA_NO_ASIO"
+	     PA_LIBADD="$PA_LIBADD libportaudio-wdmks.la"
+	    ], have_wdmks=no)
+
+# WMME default ?
+AC_TRY_LINK_LIB(winmm, [waveOutOpen(0,0,0,0,0,0);],[
+		#include <windows.h>
+		#include <mmsystem.h>
+		], [],
+	    [ 
+	     have_wmme=yes
+             LIBS="-lwinmm -lole32 -luuid"
+             CFLAGS="$CFLAGS -DPA_NO_DS -DPA_NO_ASIO -DPA_NO_WDMKS"
+             PA_LIBADD="$PA_LIBADD libportaudio-wmme.la"
+	    ], have_wmme=no)
+
+
+dnl Unix configuration
+
+dnl SGI IRIX audio library (AL) configuration (Pieter, oct 2-13, 2003).
+dnl The 'dmedia' library is needed to read the Unadjusted System Time (UST).
+dnl
+
+AC_CHECK_LIB(audio,   alOpenPort, [have_AL=1], [have_AL=0])
+AC_CHECK_LIB(dmedia,  dmGetUST, [have_dmedia=1], [have_dmedia=0])
+
+
+if [[ $have_AL = "yes" ] && [ $have_dmedia = "yes" ]] ; then
+  dnl See the '#ifdef PA_USE_SGI' in file pa_unix/pa_unix_hostapis.c
+  dnl which selects the appropriate PaXXX_Initialize() function.
+  dnl
+
+  LIBS="-ldmedia -laudio"
+  AC_DEFINE([PA_USE_SGI], [], [Define to use special SGI system support])
+  PA_LIBADD="$PA_LIBADD libportaudio-sgi.la"
+
+ # TODO: 
+ #AC_MSG_ERROR([IRIX audio library not found!])
+ #AC_MSG_ERROR([IRIX digital media library not found!])
+fi
+
+
+if [[ $have_alsa = "yes" ] && [ $with_alsa != "no" ]] ; then
+  LIBS="$LIBS -lasound"
+  AC_DEFINE([PA_USE_ALSA], [], [Define to use ALSA])
+  PA_LIBADD="$PA_LIBADD libportaudio-alsa.la"
+fi
+
+if [[ $have_jack = "yes" ] && [ $with_jack != "no" ]] ; then
+  LIBS="$LIBS $JACK_LIBS"
+  CFLAGS="$CFLAGS $JACK_CFLAGS"
+  AC_DEFINE([PA_USE_JACK], [], [Define to use JACK])
+  PA_LIBADD="$PA_LIBADD libportaudio-jack.la"
+fi
+
+if [[ $with_oss != "no" ]] ; then
+  AC_DEFINE([PA_USE_OSS], [], [Define to use Open Sound System])
+  PA_LIBADD="$PA_LIBADD libportaudio-oss.la"
+fi
+
+dnl SGI books say -lpthread should be the last of the libs mentioned.
+if [[ $acx_pthread_ok = "yes" ]] ; then
+  LIBS="$LIBS $PTHREAD_LIBS"
+  PA_LIBADD="$PA_LIBADD libportaudio-unix.la"
+else
+  if [[ $with_winapi != "wmme" -a $with_winapi != "directx" -a $with_winapi != "asio" ]] ; then
+    AC_MSG_ERROR([libpthread not found!])
+  fi
+fi
+
+
+if [[ $with_macapi = "asio" ] || [ $with_winapi = "asio" ]] ; then
+  echo "ASIODIR: $ASIODIR"
+
+  CFLAGS="$CFLAGS $ASIO_CFLAGS"
+fi
+
+if [[ $ac_cv_c_bigendian = "yes" ]] ; then
+  CFLAGS="$CFLAGS -DPA_BIG_ENDIAN"
+else
+  CFLAGS="$CFLAGS -DPA_LITTLE_ENDIAN"
+fi
+
+
+CXXFLAGS="$CXXFLAGS"
+
+#CFLAGS="-g -O2 -Wall -pedantic -pipe"
+
+CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+
+dnl extra variables
+AC_SUBST(PA_LIBADD)
+AC_SUBST(ASIO_OBJS)
+AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(CXXFLAGS)
+AC_SUBST(NASM)
+AC_SUBST(NASMOPT)
+
+AC_OUTPUT([Makefile portaudio-2.0.pc])
--- /dev/null	2006-03-10 00:02:48.821312048 +0100
+++ config/acx_pthread.m4	2006-03-17 15:41:05.000000000 +0100
@@ -0,0 +1,190 @@
+dnl Available from the GNU Autoconf Macro Archive at:
+dnl http://www.gnu.org/software/ac-archive/htmldoc/acx_pthread.html
+dnl
+AC_DEFUN([ACX_PTHREAD], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_LANG_SAVE
+AC_LANG_C
+acx_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
+        AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
+        AC_MSG_RESULT($acx_pthread_ok)
+        if test x"$acx_pthread_ok" = xno; then
+                PTHREAD_LIBS=""
+                PTHREAD_CFLAGS=""
+        fi
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try.  Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all.
+
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt"
+
+# The ordering *is* (sometimes) important.  Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+#       other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+#      doesn't hurt to check since this sometimes defines pthreads too;
+#      also defines -D_REENTRANT)
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+
+case "${host_cpu}-${host_os}" in
+        *solaris*)
+
+        # On Solaris (at least, for some versions), libc contains stubbed
+        # (non-functional) versions of the pthreads routines, so link-based
+        # tests will erroneously succeed.  (We need to link with -pthread or
+        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
+        # a function called by this macro, so we could check for that, but
+        # who knows whether they'll stub that too in a future libc.)  So,
+        # we'll just look for -pthreads and -lpthread first:
+
+        acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
+        ;;
+esac
+
+if test x"$acx_pthread_ok" = xno; then
+for flag in $acx_pthread_flags; do
+
+        case $flag in
+                none)
+                AC_MSG_CHECKING([whether pthreads work without any flags])
+                ;;
+
+                -*)
+                AC_MSG_CHECKING([whether pthreads work with $flag])
+                PTHREAD_CFLAGS="$flag"
+                ;;
+
+                *)
+                AC_MSG_CHECKING([for the pthreads library -l$flag])
+                PTHREAD_LIBS="-l$flag"
+                ;;
+        esac
+
+        save_LIBS="$LIBS"
+        save_CFLAGS="$CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Check for various functions.  We must include pthread.h,
+        # since some functions may be macros.  (On the Sequent, we
+        # need a special flag -Kthread to make this header compile.)
+        # We check for pthread_join because it is in -lpthread on IRIX
+        # while pthread_create is in libc.  We check for pthread_attr_init
+        # due to DEC craziness with -lpthreads.  We check for
+        # pthread_cleanup_push because it is one of the few pthread
+        # functions on Solaris that doesn't have a non-functional libc stub.
+        # We try pthread_create on general principles.
+        AC_TRY_LINK([#include <pthread.h>],
+                    [pthread_t th; pthread_join(th, 0);
+                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
+                     pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
+                    [acx_pthread_ok=yes])
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        AC_MSG_RESULT($acx_pthread_ok)
+        if test "x$acx_pthread_ok" = xyes; then
+                break;
+        fi
+
+        PTHREAD_LIBS=""
+        PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$acx_pthread_ok" = xyes; then
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Detect AIX lossage: threads are created detached by default
+        # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
+        AC_MSG_CHECKING([for joinable pthread attribute])
+        AC_TRY_LINK([#include <pthread.h>],
+                    [int attr=PTHREAD_CREATE_JOINABLE;],
+                    ok=PTHREAD_CREATE_JOINABLE, ok=unknown)
+        if test x"$ok" = xunknown; then
+                AC_TRY_LINK([#include <pthread.h>],
+                            [int attr=PTHREAD_CREATE_UNDETACHED;],
+                            ok=PTHREAD_CREATE_UNDETACHED, ok=unknown)
+        fi
+        if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
+                AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok,
+                          [Define to the necessary symbol if this constant
+                           uses a non-standard name on your system.])
+        fi
+        AC_MSG_RESULT(${ok})
+        if test x"$ok" = xunknown; then
+                AC_MSG_WARN([we do not know how to create joinable pthreads])
+        fi
+
+        AC_MSG_CHECKING([if more special flags are required for pthreads])
+        flag=no
+        case "${host_cpu}-${host_os}" in
+                *-aix* | *-freebsd*)     flag="-D_THREAD_SAFE";;
+                *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+        esac
+        AC_MSG_RESULT(${flag})
+        if test "x$flag" != xno; then
+                PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+        fi
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        # More AIX lossage: must compile with cc_r
+        AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
+else
+        PTHREAD_CC="$CC"
+fi
+
+AC_SUBST(PTHREAD_LIBS)
+AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(PTHREAD_CC)
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pthread_ok" = xyes; then
+        ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
+        :
+else
+        acx_pthread_ok=no
+        $2
+fi
+AC_LANG_RESTORE
+])dnl ACX_PTHREAD
--- /dev/null	2006-03-10 00:02:48.821312048 +0100
+++ config/pkg_check.m4	2006-03-17 22:12:37.000000000 +0100
@@ -0,0 +1,49 @@
+
+AC_DEFUN([PKG_CHECK_LIB], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_LANG_SAVE
+AC_LANG_C
+
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $3"
+        save_LIBS="$LIBS"
+        LIBS="$2 $LIBS"
+        AC_MSG_CHECKING([for $1 in LIBS=$2 with CFLAGS=$3])
+        AC_TRY_LINK_FUNC([$1], pkg_check_try_link=yes, pkg_check_try_link=no)
+        AC_MSG_RESULT($pkg_check_try_link)
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$pkg_check_try_link" = xyes; then
+	$4
+else
+	$5
+fi
+AC_LANG_RESTORE
+])dnl PKG_CHECK_LIB
+
+
+AC_DEFUN([AC_TRY_LINK_LIB], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_LANG_SAVE
+AC_LANG_C
+
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $4"
+        save_LIBS="$LIBS"
+        LIBS="-l$1 $LIBS"
+        AC_MSG_CHECKING([for $2 in $1])
+        AC_TRY_LINK([$3], [$2], ac_try_link_lib=yes, ac_try_link_lib=no)
+        AC_MSG_RESULT($ac_try_link_lib)
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$ac_try_link_lib" = xyes; then
+	$5
+else
+	$6
+fi
+AC_LANG_RESTORE
+])dnl AC_TRY_LINK_LIB
--- /dev/null	2006-03-10 00:02:48.821312048 +0100
+++ bootstrap	2006-03-19 23:33:58.000000000 +0100
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+rm -rf config.cache autom4te*.cache
+
+aclocal-1.9 -I config
+autoconf2.50
+autoheader2.50
+libtoolize --automake
+automake-1.9 --add-missing --foreign