summaryrefslogtreecommitdiff
path: root/devel/SDL/patches/patch-am
blob: 2001494d6849bb1341df9d34ee9758007ae932ad (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
$NetBSD: patch-am,v 1.9 2003/07/26 21:38:23 jmmv Exp $

--- configure.orig	2002-10-06 22:35:02.000000000 +0200
+++ configure
@@ -3094,6 +3094,8 @@ rm -f conftest*
         echo "$ac_t""$have_oss" 1>&6
         if test x$have_oss = xyes; then
             CFLAGS="$CFLAGS -DOSS_SUPPORT"
+            LDFLAGS="$LDFLAGS $LIBOSSAUDIO"
+            SDL_LIBS="$SDL_LIBS $LIBOSSAUDIO"
             AUDIO_SUBDIRS="$AUDIO_SUBDIRS dsp"
             AUDIO_DRIVERS="$AUDIO_DRIVERS dsp/libaudio_dsp.la"
             AUDIO_SUBDIRS="$AUDIO_SUBDIRS dma"
@@ -3630,10 +3632,7 @@ fi
     if test x$enable_audio = xyes -a x$enable_nas = xyes; then
         echo $ac_n "checking for NAS audio support""... $ac_c" 1>&6
 echo "configure:3633: checking for NAS audio support" >&5
-        have_nas=no
-        if test -r /usr/X11R6/include/audio/audiolib.h; then
             have_nas=yes
-        fi
         echo "$ac_t""$have_nas" 1>&6
         if test x$have_nas = xyes; then
             CFLAGS="$CFLAGS -DNAS_SUPPORT"
@@ -3782,7 +3781,7 @@ fi
                   NASMFLAGS="-f aoutb"
                   ;;
               *)
-                  NASMFLAGS="-f elf"
+                  test -n "$NASMFLAGS" || NASMFLAGS="-f elf"
                   ;;
             esac
             
@@ -5385,34 +5384,53 @@ else
 fi
 
     if test x$enable_video = xyes -a x$enable_video_aalib = xyes; then
-        echo $ac_n "checking for AAlib support""... $ac_c" 1>&6
-echo "configure:5390: checking for AAlib support" >&5
-        video_aalib=no
-        cat > conftest.$ac_ext <<EOF
-#line 5393 "configure"
-#include "confdefs.h"
-
-         #include <aalib.h>
-        
-int main() {
-
-        
-; return 0; }
-EOF
-if { (eval echo configure:5403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  
-        video_aalib=yes
-        
+        # Extract the first word of "aalib-config", so it can be a program name with args.
+set dummy aalib-config; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:5389: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_AALIB_CONFIG'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
+  case "$AALIB_CONFIG" in
+  /*)
+  ac_cv_path_AALIB_CONFIG="$AALIB_CONFIG" # Let the user override the test with a path.
+  ;;
+  ?:/*)			 
+  ac_cv_path_AALIB_CONFIG="$AALIB_CONFIG" # Let the user override the test with a dos path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_AALIB_CONFIG="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
 fi
-rm -f conftest*
+AALIB_CONFIG="$ac_cv_path_AALIB_CONFIG"
+if test -n "$AALIB_CONFIG"; then
+  echo "$ac_t""$AALIB_CONFIG" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+        echo $ac_n "checking for AAlib support""... $ac_c" 1>&6
+echo "configure:5422: checking for AAlib support" >&5
+        if test x$AALIB_CONFIG = x; then
+            video_aalib=no
+	else
+            AALIB_LIBS=`$AALIB_CONFIG --libs`
+            video_aalib=yes
+        fi
         echo "$ac_t""$video_aalib" 1>&6
         if test x$video_aalib = xyes; then
             CFLAGS="$CFLAGS -DENABLE_AALIB"
-            SYSTEM_LIBS="$SYSTEM_LIBS -laa"
+            SYSTEM_LIBS="$SYSTEM_LIBS $AALIB_LIBS"
 
             VIDEO_SUBDIRS="$VIDEO_SUBDIRS aalib"
             VIDEO_DRIVERS="$VIDEO_DRIVERS aalib/libvideo_aa.la"
@@ -5755,19 +5773,20 @@ else
 fi
 
     if test x$enable_threads = xyes -a x$enable_pth = xyes; then
-        # Extract the first word of "pth-config", so it can be a program name with args.
-set dummy pth-config; ac_word=$2
+        # Use the libpthread version of the pth library.
+        # Extract the first word of "pthread-config", so it can be a program name with args.
+set dummy pthread-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5762: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_PTH_CONFIG'+set}'`\" = set"; then
+echo "configure:5779: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_PTHREAD_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  case "$PTH_CONFIG" in
+  case "$PTHREAD_CONFIG" in
   /*)
-  ac_cv_path_PTH_CONFIG="$PTH_CONFIG" # Let the user override the test with a path.
+  ac_cv_path_PTHREAD_CONFIG="$PTHREAD_CONFIG" # Let the user override the test with a path.
   ;;
   ?:/*)			 
-  ac_cv_path_PTH_CONFIG="$PTH_CONFIG" # Let the user override the test with a dos path.
+  ac_cv_path_PTHREAD_CONFIG="$PTHREAD_CONFIG" # Let the user override the test with a dos path.
   ;;
   *)
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
@@ -5775,27 +5794,27 @@ else
   for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
-      ac_cv_path_PTH_CONFIG="$ac_dir/$ac_word"
+      ac_cv_path_PTHREAD_CONFIG="$ac_dir/$ac_word"
       break
     fi
   done
   IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_PTH_CONFIG" && ac_cv_path_PTH_CONFIG="no"
+  test -z "$ac_cv_path_PTHREAD_CONFIG" && ac_cv_path_PTHREAD_CONFIG="no"
   ;;
 esac
 fi
-PTH_CONFIG="$ac_cv_path_PTH_CONFIG"
-if test -n "$PTH_CONFIG"; then
-  echo "$ac_t""$PTH_CONFIG" 1>&6
+PTHREAD_CONFIG="$ac_cv_path_PTHREAD_CONFIG"
+if test -n "$PTHREAD_CONFIG"; then
+  echo "$ac_t""$PTHREAD_CONFIG" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
-        if test "$PTH_CONFIG" = "no"; then
+        if test "$PTHREAD_CONFIG" = "no"; then
             use_pth=no
         else
-            PTH_CFLAGS=`$PTH_CONFIG --cflags`
-            PTH_LIBS=`$PTH_CONFIG --libs --all`
+            PTH_CFLAGS=`$PTHREAD_CONFIG --cflags`
+            PTH_LIBS=`$PTHREAD_CONFIG --libs --all`
             SDL_CFLAGS="$SDL_CFLAGS $PTH_CFLAGS"
             SDL_LIBS="$SDL_LIBS $PTH_LIBS"
             CFLAGS="$CFLAGS -DENABLE_PTH"
@@ -5844,8 +5863,8 @@ fi
             pthread_lib="-pthread"
             ;;
         *-*-netbsd*)
-            pthread_cflags="-I/usr/pkg/include -D_REENTRANT"
-            pthread_lib="-L/usr/pkg/lib -lpthread -lsem"
+            pthread_cflags="-D_REENTRANT"
+            pthread_lib="-lpthread"
             ;;
         *-*-openbsd*)
             pthread_cflags="-D_REENTRANT"
@@ -6760,56 +6779,45 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
-        echo $ac_n "checking for hid_init in -lusb""... $ac_c" 1>&6
-echo "configure:6765: checking for hid_init in -lusb" >&5
-ac_lib_var=`echo usb'_'hid_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+        if test x$have_libusbhid = xyes; then
+            SYSTEM_LIBS="$SYSTEM_LIBS -lusbhid"
+
+            ac_safe=`echo "usbhid.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for usbhid.h""... $ac_c" 1>&6
+echo "configure:6786: checking for usbhid.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_save_LIBS="$LIBS"
-LIBS="-lusb  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 6773 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 6791 "configure"
 #include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char hid_init();
-
-int main() {
-hid_init()
-; return 0; }
+#include <usbhid.h>
 EOF
-if { (eval echo configure:6784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
   rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
+  eval "ac_cv_header_$ac_safe=yes"
 else
+  echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
+  eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
-LIBS="$ac_save_LIBS"
-
 fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  have_libusb=yes
+  have_usbhid_h=yes
 else
   echo "$ac_t""no" 1>&6
 fi
 
-        if test x$have_libusbhid = xyes; then
-            SYSTEM_LIBS="$SYSTEM_LIBS -lusbhid"
-        fi
-        if test x$have_libusb = xyes; then
-            SYSTEM_LIBS="$SYSTEM_LIBS -lusb"
-        fi
-
-        ac_safe=`echo "usb.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for usb.h""... $ac_c" 1>&6
-echo "configure:6813: checking for usb.h" >&5
+            ac_safe=`echo "libusbhid.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for libusbhid.h""... $ac_c" 1>&6
+echo "configure:6819: checking for libusbhid.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6814,12 +6822,12 @@ if eval "test \"`echo '$''{'ac_cv_header
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6818 "configure"
+#line 6824 "configure"
 #include "confdefs.h"
-#include <usb.h>
+#include <libusbhid.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6835,47 +6843,64 @@ rm -f conftest*
 fi
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  have_usb_h=yes
+  have_libusbhid_h=yes
 else
   echo "$ac_t""no" 1>&6
 fi
 
-        ac_safe=`echo "usbhid.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for usbhid.h""... $ac_c" 1>&6
-echo "configure:6846: checking for usbhid.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+            if test x$have_usbhid_h = xyes; then
+                CFLAGS="$CFLAGS -DHAVE_USBHID_H"
+            fi
+            if test x$have_libusbhid_h = xyes; then
+                CFLAGS="$CFLAGS -DHAVE_LIBUSBHID_H"
+        fi
+	else
+            echo $ac_n "checking for hid_init in -lusb""... $ac_c" 1>&6
+echo "configure:6858: checking for hid_init in -lusb" >&5
+ac_lib_var=`echo usb'_'hid_init | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 6851 "configure"
+  ac_save_LIBS="$LIBS"
+LIBS="-lusb  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 6866 "configure"
 #include "confdefs.h"
-#include <usbhid.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char hid_init();
+
+int main() {
+hid_init()
+; return 0; }
 EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
+if { (eval echo configure:6877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
+  eval "ac_cv_lib_$ac_lib_var=yes"
 else
-  echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
+LIBS="$ac_save_LIBS"
+
 fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  have_usbhid_h=yes
+  have_libusb=yes
 else
   echo "$ac_t""no" 1>&6
 fi
 
-        ac_safe=`echo "libusb.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for libusb.h""... $ac_c" 1>&6
-echo "configure:6879: checking for libusb.h" >&5
+        if test x$have_libusb = xyes; then
+            SYSTEM_LIBS="$SYSTEM_LIBS -lusb"
+
+        ac_safe=`echo "usb.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for usb.h""... $ac_c" 1>&6
+echo "configure:6902: checking for usb.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6880,12 +6905,12 @@ if eval "test \"`echo '$''{'ac_cv_header
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6884 "configure"
+#line 6907 "configure"
 #include "confdefs.h"
-#include <libusb.h>
+#include <usb.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6901,14 +6926,14 @@ rm -f conftest*
 fi
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  have_libusb_h=yes
+  have_usb_h=yes
 else
   echo "$ac_t""no" 1>&6
 fi
 
-        ac_safe=`echo "libusbhid.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for libusbhid.h""... $ac_c" 1>&6
-echo "configure:6912: checking for libusbhid.h" >&5
+        ac_safe=`echo "libusb.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for libusb.h""... $ac_c" 1>&6
+echo "configure:6935: checking for libusb.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6913,12 +6938,12 @@ if eval "test \"`echo '$''{'ac_cv_header
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6917 "configure"
+#line 6940 "configure"
 #include "confdefs.h"
-#include <libusbhid.h>
+#include <libusb.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6934,7 +6959,7 @@ rm -f conftest*
 fi
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  have_libusbhid_h=yes
+  have_libusb_h=yes
 else
   echo "$ac_t""no" 1>&6
 fi
@@ -6942,14 +6967,10 @@ fi
         if test x$have_usb_h = xyes; then
             CFLAGS="$CFLAGS -DHAVE_USB_H"
         fi
-        if test x$have_usbhid_h = xyes; then
-            CFLAGS="$CFLAGS -DHAVE_USBHID_H"
-        fi
         if test x$have_libusb_h = xyes; then
             CFLAGS="$CFLAGS -DHAVE_LIBUSB_H"
         fi
-        if test x$have_libusbhid_h = xyes; then
-            CFLAGS="$CFLAGS -DHAVE_LIBUSBHID_H"
+            fi
         fi
 
         echo $ac_n "checking for usbhid""... $ac_c" 1>&6
@@ -7313,6 +7334,7 @@ __EOF__
         CheckESD
         CheckNAS
         CheckX11
+        CheckDGA
         CheckAAlib
         CheckOpenGL
         CheckPTHREAD
@@ -7331,9 +7353,9 @@ __EOF__
 
         # Set up files for the audio library
         if test x$enable_audio = xyes; then
-            CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
-            AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
-            AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
+            CFLAGS="$CFLAGS -DOPENBSD_AUDIO_SUPPORT"
+            AUDIO_SUBDIRS="$AUDIO_SUBDIRS openbsd"
+            AUDIO_DRIVERS="$AUDIO_DRIVERS openbsd/libaudio_openbsd.la"
         fi
         # Set up files for the cdrom library
         if test x$enable_cdrom = xyes; then
@@ -7342,9 +7364,6 @@ __EOF__
         fi
         # Set up files for the thread library
         if test x$enable_threads = xyes; then
-            if test x$use_pthreads = xyes; then
-                CFLAGS="$CFLAGS -D_POSIX_THREAD_SYSCALL_SOFT=1"
-            fi
             CopyUnixThreadSource
         fi
         # Set up files for the timer library
@@ -8759,7 +8778,7 @@ fi
 
 # Set runtime shared library paths as needed
 
-if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi; then
+if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi -o $ARCH = netbsd; then
   SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib"
 fi
 if test $ARCH = solaris; then
@@ -9143,7 +9162,8 @@ s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
 s%@PKG_CONFIG@%$PKG_CONFIG%g
 s%@DIRECTFB_CFLAGS@%$DIRECTFB_CFLAGS%g
 s%@DIRECTFB_LIBS@%$DIRECTFB_LIBS%g
-s%@PTH_CONFIG@%$PTH_CONFIG%g
+s%@AALIB_CONFIG@%$AALIB_CONFIG%g
+s%@PTHREAD_CONFIG@%$PTHREAD_CONFIG%g
 s%@ARCH@%$ARCH%g
 s%@TARGET_LINUX_TRUE@%$TARGET_LINUX_TRUE%g
 s%@TARGET_LINUX_FALSE@%$TARGET_LINUX_FALSE%g