From alsa-devel-owner@alsa.jcu.cz  Thu Oct 29 17:22:37 1998
Received: from umr.edu (hermes.cc.umr.edu [131.151.1.68])
	by marvin.jcu.cz (8.9.1a/8.9.1) with ESMTP id RAA31407
	for <alsa-devel@jcu.cz>; Thu, 29 Oct 1998 17:22:23 +0100
Received: from AeroSpace.fries.net (dfries.student.umr.edu [131.151.188.49]) via ESMTP by hermes.cc.umr.edu (8.8.7/R.4.20) id KAA16993; Thu, 29 Oct 1998 10:22:10 -0600 (CST)
Received: (from david@localhost)
	by AeroSpace.fries.net (8.9.1a/8.9.1/Debian/GNU) id JAA03920
	for alsa-devel@jcu.cz; Thu, 29 Oct 1998 09:43:40 -0600
Message-ID: <19981029094340.B3720@AeroSpace.miango.com>
Date: Thu, 29 Oct 1998 09:43:40 -0600
From: David Fries <dfries@umr.edu>
To: alsa-devel@jcu.cz
Subject: Re: configure install directory
References: <199810290705.CAA15897@cyphyn.219.org> <Pine.LNX.3.95.981029021120.15903A-100000@cyphyn.219.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
In-Reply-To: <Pine.LNX.3.95.981029021120.15903A-100000@cyphyn.219.org>; from Fred Floberg on Thu, Oct 29, 1998 at 02:44:44AM -0500
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list


I haven't tested it, but it would appear to work.  That's not what I had in
mind.  I have my scripts setup to give the complete directory to the
configuration script so I don't need to modify it.

What I was looking for was for the configuration script to take a directory
with the --with-moddir and replace a string in it like the <KVER> it's help
example seems to suggest with the kernel version.  I would think other
people would run into the same thing and it would be helpful to have it
working.

Here is my fix Jaroslav Kysela does it look good?

--- configure.back      Thu Oct 29 09:24:33 1998
+++ configure   Thu Oct 29 09:40:14 1998
@@ -1341,7 +1341,7 @@
 # Check whether --with-moddir or --without-moddir was given.
 if test "${with_moddir+set}" = set; then
   withval="$with_moddir"
-  moddir="$withval"
+  moddir=`echo $withval | sed s/KVER/$kaversion/`
 else
   # Special test for RH 5.1
   if test -d /lib/modules/preferred; then
--- configure.in.bak    Thu Oct 29 09:25:08 1998
+++ configure.in        Thu Oct 29 09:40:06 1998
@@ -110,7 +110,7 @@
 AC_ARG_WITH(moddir,
   [  --with-moddir=/path     give the path for the alsa driver kernel
modules]
   [                        [/lib/modules/<KVER>/misc]],
-  moddir="$withval", 
+  moddir=`echo $withval | sed s/KVER/$kaversion/`, 
 # Special test for RH 5.1
   if test -d /lib/modules/preferred; then
     moddir="/lib/modules/preferred"


And I even tested it to make sure it works, (and it does).

On Thu, Oct 29, 1998 at 02:44:44AM -0500, Fred Floberg wrote:
> 
> 
> On Thu, 29 Oct 1998 dfries@umr.edu wrote:
> 
> > I have a unusual setup here and I need to specify a different module path
> > with the configuration path.  I need the modules to go in
> > /lib/modules/spacedout/lib/modules/2.1.127/misc with in place of 2.1.127
> > the current kernel.  The computer with the sound card is practically
> > diskless, getting most all files over nfs, and the module directory can't
> > be shared with the modules on the host machine.
> > 
> [snip]
> > Is there a good way to have the kernel version be updated within the
> > configure script? [...]
> 
> Hmmm.. This is just a suggestion. I haven't tested it, but it looks like
> you can edit the configure script starting at around line 1287:
> 
> # Check whether --with-moddir or --without-moddir was given.
> if test "${with_moddir+set}" = set; then
>   withval="$with_moddir"
>   moddir="$withval"
> else
>   # Special test for RH 5.1
>   if test -d /lib/modules/preferred; then
>     moddir="/lib/modules/preferred"
>   else
>     moddir="/lib/modules/$kaversion/misc"
>   fi
> 
> fi
> 
> 
> To become this:
> 
> # Check whether --with-moddir or --without-moddir was given.
> if test "${with_moddir+set}" = set; then
>   withval="$with_moddir"
>   moddir="$withval"
> else
>   # Special test for RH 5.1
> # if test -d /lib/modules/preferred; then
> #   moddir="/lib/modules/preferred"
> # else
> #   moddir="/lib/modules/$kaversion/misc"
> # fi
> moddir=/lib/modules/spacedout/lib/modules/$kaversion/misc
> fi
> 
> 
> This should do what you want and still allow you to specify an
> alternate directory with --with-moddir=/xxx if you should want to.
> 
> To avoid editing the configure script (which will get overwritten
> every time you run autoconf) you might try
> 
> # export KERNELVER=`cat /proc/version |cut -d' ' -f3 -`
> # ./configure --with-moddir=/lib/modules/spacedout/lib/modules/$KERNELVER/misc
> 
> 
> 
> Fred
> 
> 
> ------
> To unsubscribe from <alsa-devel@alsa.jcu.cz> mailing list send message
> 'unsubscribe' in the body of message to <alsa-devel-request@alsa.jcu.cz>.

-- 
		+---------------------------------+
		|      David Fries                |
		|      dfries@umr.edu             |
		+---------------------------------+

