summaryrefslogtreecommitdiff
path: root/devel/SDL/patches/patch-aj
blob: b877dd32533a50ffc3a27ceafbbdf1ec2cc773db (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
$NetBSD: patch-aj,v 1.3 2000/10/22 16:55:20 rh Exp $

--- configure.in.orig	Wed Sep 27 08:15:33 2000
+++ configure.in
@@ -903,6 +903,7 @@
         ;;
     *-*-netbsd*)
         ARCH=netbsd
+	CheckESD
         CheckX11
         CheckAAlib
         CheckOpenGL
@@ -912,6 +913,14 @@
         # Set up files for the audio library
         AUDIO_ARCH=solaris
         AUDIO_ARCH_LIB=$AUDIO_ARCH/libaudio_arch.la
+        if test x$enable_audio = xyes; then
+            COPY_ARCH_SRC(src/audio, solaris, SDL_audiodev_c.h)
+            COPY_ARCH_SRC(src/audio, linux, SDL_audiodev.c)
+            COPY_ARCH_SRC(src/audio, linux, SDL_esdaudio.h)
+            COPY_ARCH_SRC(src/audio, linux, SDL_esdaudio.c)
+            COPY_ARCH_SRC(src/audio, solaris, SDL_lowaudio.h)
+            COPY_ARCH_SRC(src/audio, solaris, SDL_sysaudio.c)
+        fi
         # Set up files for the joystick library
         # (No joystick support yet)
         if test x$enable_joystick = xyes; then
@@ -927,7 +936,11 @@
             COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
-            COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
+	    if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then
+		COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
+	    else
+		COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
+	    fi
             COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
             COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
             COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
@@ -937,7 +950,7 @@
             COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
         fi
         # NetBSD does not define "unix"
-        CFLAGS="$CFLAGS -Dunix"
+        CFLAGS="$CFLAGS -Dunix -D_POSIX_THREAD_SYSCALL_SOFT=1"
         ;;
     *-*-openbsd*)
         ARCH=openbsd
@@ -1325,6 +1338,7 @@
 AM_CONDITIONAL(TARGET_SOLARIS, test $ARCH = solaris)
 AM_CONDITIONAL(TARGET_IRIX, test $ARCH = irix)
 AM_CONDITIONAL(TARGET_FREEBSD, test $ARCH = freebsd)
+AM_CONDITIONAL(TARGET_NETBSD, test $ARCH = netbsd)
 AM_CONDITIONAL(TARGET_OPENBSD, test $ARCH = openbsd)
 AM_CONDITIONAL(TARGET_AIX, test $ARCH = aix)
 AM_CONDITIONAL(TARGET_WIN32, test $ARCH = win32)
@@ -1341,6 +1355,10 @@
   SDL_RLD_FLAGS="-R\${exec_prefix}/lib"
 fi
 
+if test $ARCH = netbsd; then
+  SDL_RLD_FLAGS="-Wl,-R\${exec_prefix}/lib -Wl,-R\${X11BASE}/lib"
+fi
+
 dnl Output the video drivers we use
 if test x$enable_video = xtrue; then
     if test "$VIDEO_SUBDIRS" = ""; then
@@ -1395,6 +1413,7 @@
 src/audio/irix/Makefile
 src/audio/linux/Makefile
 src/audio/macos/Makefile
+src/audio/netbsd/Makefile
 src/audio/openbsd/Makefile
 src/audio/solaris/Makefile
 src/audio/win32/Makefile