$NetBSD: patch-aj,v 1.5 2001/05/05 13:47:13 rh Exp $ --- configure.in.orig Tue Mar 27 05:39:19 2001 +++ configure.in @@ -389,7 +389,7 @@ NASMFLAGS="-f win32" ;; *) - NASMFLAGS="-f elf" + test -n "$NASMFLAGS" || NASMFLAGS="-f elf" ;; esac AC_SUBST(NASMFLAGS) @@ -1199,7 +1199,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) @@ -1209,7 +1213,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 @@ -1769,6 +1773,7 @@ AM_CONDITIONAL(TARGET_IRIX, test $ARCH = irix) AM_CONDITIONAL(TARGET_BSDI, test $ARCH = bsdi) 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) @@ -1788,6 +1793,10 @@ if test $ARCH = solaris; then 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