Date: Fri, 12 Sep 2003 18:04:19 -0400
authorSam Lantinga <slouken@libsdl.org>
Sun, 21 Sep 2003 18:18:17 +0000
changeset 719 269c97e24da6
parent 718 cbc0f7fabd1c
child 720 f90d80d68071
Date: Fri, 12 Sep 2003 18:04:19 -0400 From: Matthew Danish Subject: patch for k*bsd support I am forwarding this patch from Robert Millan <rmh@debian.org> for supporting K*BSD systems (BSD kernel GNU userland, and hurd) in configure.in.
configure.in
--- a/configure.in	Sun Sep 21 18:13:48 2003 +0000
+++ b/configure.in	Sun Sep 21 18:18:17 2003 +0000
@@ -1712,8 +1712,14 @@
 }
 
 case "$target" in
-    *-*-linux*)
-        ARCH=linux
+    *-*-linux*|*-*-gnu*|*-*-k*bsd*-gnu)
+        case "$target" in
+	  *-*-linux*) ARCH=linux ;;
+	  *-*-kfreebsd*-gnu) ARCH=kfreebsd-gnu ;;
+	  *-*-knetbsd*-gnu) ARCH=knetbsd-gnu ;;
+	  *-*-kopenbsd*-gnu) ARCH=kopenbsd-gnu ;;
+	  *-*-gnu*) ARCH=gnu ;; # must be last
+	esac
         CheckDummyVideo
         CheckDiskAudio
         CheckDLOPEN
@@ -1754,13 +1760,41 @@
         #fi
         # Set up files for the joystick library
         if test x$enable_joystick = xyes; then
-            JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS linux"
-            JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS linux/libjoystick_linux.la"
+	  case $ARCH in
+	    linux)
+              JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS linux"
+              JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS linux/libjoystick_linux.la"
+	    ;;
+	    gnu)
+              JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
+              JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
+	    ;;
+	    k*bsd-gnu)
+              JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS bsd"
+              JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS bsd/libjoystick_bsd.la"
+	    ;;
+	  esac
         fi
         # Set up files for the cdrom library
         if test x$enable_cdrom = xyes; then
-            CDROM_SUBDIRS="$CDROM_SUBDIRS linux"
-            CDROM_DRIVERS="$CDROM_DRIVERS linux/libcdrom_linux.la"
+	  case $ARCH in
+	    linux)
+              CDROM_SUBDIRS="$CDROM_SUBDIRS linux"
+              CDROM_DRIVERS="$CDROM_DRIVERS linux/libcdrom_linux.la"
+	    ;;
+	    gnu)
+              CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
+              CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
+	    ;;
+	    kfreebsd-gnu)
+              CDROM_SUBDIRS="$CDROM_SUBDIRS freebsd"
+              CDROM_DRIVERS="$CDROM_DRIVERS freebsd/libcdrom_freebsd.la"
+	    ;;
+	    knetbsd-gnu|kopenbsd-gnu)
+              CDROM_SUBDIRS="$CDROM_SUBDIRS openbsd"
+              CDROM_DRIVERS="$CDROM_DRIVERS openbsd/libcdrom_openbsd.la"
+	    ;;
+	  esac
         fi
         # Set up files for the thread library
         if test x$enable_threads = xyes; then