From xemacs-m  Sat Mar 22 06:15:37 1997
Received: from bittersweet.inetarena.com (karlheg@bittersweet.inetarena.com [206.129.216.38])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id GAA27981
	for <xemacs-beta@xemacs.org>; Sat, 22 Mar 1997 06:15:35 -0600 (CST)
Received: (from karlheg@localhost)
	by bittersweet.inetarena.com (8.8.5/8.8.5) id EAA05337;
	Sat, 22 Mar 1997 04:15:24 -0800
Date: Sat, 22 Mar 1997 04:15:24 -0800
Message-Id: <199703221215.EAA05337@bittersweet.inetarena.com>
From: "Karl M. Hegbloom" <karlheg@inetarena.com>
To: <xemacs-beta@xemacs.org>
Subject: Re: Configure patch for Linux sound=native 
In-Reply-To: <199703221128.UAA02881@jsk.t.u-tokyo.ac.jp>
References: <199703221056.CAA04639@bittersweet.inetarena.com>
	<199703221128.UAA02881@jsk.t.u-tokyo.ac.jp>
X-Mailer: VM 6.21 under 19.15 XEmacs Lucid (beta103)
Comments: Hyperbole mail buttons accepted, v04.023.
Mime-Version: 1.0 (generated by tm-edit 7.106)
Content-Type: multipart/mixed;
 boundary="Multipart_Sat_Mar_22_04:14:56_1997-1"
Content-Transfer-Encoding: 7bit

--Multipart_Sat_Mar_22_04:14:56_1997-1
Content-Type: text/plain; charset=US-ASCII

>>>>> "Hajime" == Hajime Saitou <hajime@jsk.t.u-tokyo.ac.jp> writes:

    Hajime> What if the sound driver were compiled as a module and
    Hajime> hadn't been loaded yet? This test would fail on the
    Hajime> machine that I'm currently typing on which does have
    Hajime> sound. How about "cat"ing a small *.au file to /dev/audio?
    Hajime> Or is there anything better?

 Hmmm.  I guess we could look for:

if $(cat /lib/modules/$(uname -r)/modules.dep | grep -q sound.o);
then
  with_sound = "native"
fi

 I think it's best to look in the modules.dep file, since it has to be
there in order for kerneld to load it, right?  Or am I wrong?

 Try this:

--Multipart_Sat_Mar_22_04:14:56_1997-1
Content-Type: application/octet-stream; type=patch
Content-Disposition: attachment; filename="configure-linux-sound.patch"
Content-Transfer-Encoding: 7bit

*** configure~1~	Fri Mar 21 23:57:09 1997
--- configure	Sat Mar 22 04:08:59 1997
***************
*** 6600,6611 ****
--- 6600,6620 ----
     :; with_sound="native"
  else
     :; 
  fi
   
      ;;
+     *-linux* )
+       if $(cat /proc/devices | grep -q 'sound') ;
+       then
+         with_sound="native"
+       elif $(cat /lib/modules/$(uname -r)/modules.dep | grep -q 'sound.o');
+       then
+ 	  with_sound="native"
+       fi
+     ;;
      esac
    fi
  fi
  
  #### If the nas library doesn't contain the error jump point, then
  #### we force safer behaviour.

--Multipart_Sat_Mar_22_04:14:56_1997-1
Content-Type: text/plain; charset=US-ASCII


or...


--Multipart_Sat_Mar_22_04:14:56_1997-1
Content-Type: application/octet-stream; type=patch
Content-Disposition: attachment; filename="configure.in-linux-sound.patch"
Content-Transfer-Encoding: 7bit

*** configure.in~1~	Fri Mar 21 23:57:10 1997
--- configure.in	Sat Mar 22 04:10:53 1997
***************
*** 3890,3901 ****
--- 3890,3910 ----
        *-sgi-* )
        ] AC_HAVE_LIBRARY(-laudio, with_sound="native") [
      ;;
      hppa*-hp-hpux* )
        ] AC_HAVE_LIBRARY(-lAlib, with_sound="native") [
      ;;
+     *-linux* )
+       if $(cat /proc/devices | grep -q 'sound') ;
+       then
+         with_sound="native"
+       elif $(cat /lib/modules/$(uname -r)/modules.dep | grep -q 'sound.o');
+       then
+ 	  with_sound="native"
+       fi
+     ;;
      esac
    fi
  fi
  
  #### If the nas library doesn't contain the error jump point, then
  #### we force safer behaviour.

--Multipart_Sat_Mar_22_04:14:56_1997-1
Content-Type: text/plain; charset=US-ASCII



--Multipart_Sat_Mar_22_04:14:56_1997-1
Content-Type: text/plain; charset=US-ASCII

Karl M. Hegbloom <karlheg@inetarena.com>
http://www.inetarena.com/~karlheg
Portland, OR  USA
Debian GNU 1.2  Linux 2.0.29t


--Multipart_Sat_Mar_22_04:14:56_1997-1--

