summaryrefslogtreecommitdiff
path: root/lang/squeak/patches/patch-ag
blob: e1ddaacb3eba8db54857bbca775e51c9a9291469 (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
$NetBSD: patch-ag,v 1.1 2002/10/02 22:00:10 dillo Exp $

--- ../src/unix/configure.orig	Wed Oct  2 23:48:40 2002
+++ ../src/unix/configure
@@ -3737,7 +4463,22 @@ int main() {
 OPEN_SOUND_SYSTEM;
 ; return 0; }
 EOF
-if { (eval echo configure:3741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_oss="yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  cat > conftest.$ac_ext <<EOF
+#line 4475 "configure"
+#include "confdefs.h"
+#include <soundcard.h>
+int main() {
+SOUND_VERSION;
+; return 0; }
+EOF
+if { (eval echo configure:4482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_oss="yes"
 else
@@ -3748,6 +4489,8 @@ else
 fi
 rm -f conftest*
 fi
+rm -f conftest*
+fi
 
 echo "$ac_t""$ac_cv_oss" 1>&6
 if $test "$ac_cv_oss" = "yes" -a -e /dev/dsp; then
@@ -3759,9 +4502,65 @@ EOF
 #define OSS_DEVICE "/dev/dsp"
 EOF
 
+elif $test "$ac_cv_oss" = "yes" -a -e /dev/audio; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_OSS 1
+EOF
+
+  cat >> confdefs.h <<\EOF
+#define OSS_DEVICE "/dev/audio"
+EOF
+
+  echo $ac_n "checking for _oss_ioctl in -lossaudio""... $ac_c" 1>&6
+echo "configure:4516: checking for _oss_ioctl in -lossaudio" >&5
+ac_lib_var=`echo ossaudio'_'_oss_ioctl | 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
+  ac_save_LIBS="$LIBS"
+LIBS="-lossaudio  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4524 "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 _oss_ioctl();
+
+int main() {
+_oss_ioctl()
+; return 0; }
+EOF
+if { (eval echo configure:4535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo ossaudio | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lossaudio $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
 fi
 echo $ac_n "checking for prefix to use for loadable modules""... $ac_c" 1>&6
-echo "configure:3765: checking for prefix to use for loadable modules" >&5
+echo "configure:4564: checking for prefix to use for loadable modules" >&5
 if eval "test \"`echo '$''{'ac_cv_module_prefix'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else