From: Eliot Blennerhassett Subject: [PATCH] Better detection of default firmware installation directory Date: Wed, 14 Jun 2006 10:06:40 +1200 Message-ID: <200606141006.41323.linux@blennerhassett.gen.nz> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@lists.sourceforge.net Errors-To: alsa-devel-bounces@lists.sourceforge.net To: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org Having recently added firmware to alsa-firmware, I noticed that the default installation location is /usr/lib/hotplug/firmware. I think current recommended location is in /lib/firmware? We have something like this in our configure.in to try to do the right thing on different systems. Heres a patch for alsa-firmware/configure.in Signed-off-by: Eliot Blennerhassett diff -r 8a1538f88e76 configure.in --- a/configure.in Tue Jun 13 12:07:11 2006 +0200 +++ b/configure.in Wed Jun 14 10:04:04 2006 +1200 @@ -29,13 +29,26 @@ AM_CONDITIONAL(USE_HOTPLUG, test "$hotpl AM_CONDITIONAL(USE_HOTPLUG, test "$hotplug" = "yes") AM_CONDITIONAL(BUILD_FW, test "$buildfw" = "yes") +AC_MSG_CHECKING(firmware installation directory) +# where to put the firmware. If none of these is right, can specify where +# --with-hotplug-dir +if test -d /lib/firmware ; then + detected_fwdir="/lib/firmware/" +elif test -d /lib/hotplug/firmware ; then + detected_fwdir="/lib/hotplug/firmware/" +elif test -d /usr/lib/hotplug/firmware ; then + detected_fwdir="/usr/lib/hotplug/firmware/" +else + detected_fwdir="/lib/firmware/" +fi + AC_ARG_WITH(hotplug-dir, [ --with-hotplug-dir Specify the hotplug firmware directory], [hotplugfwdir="$withval"], - [hotplugfwdir="/usr/lib/hotplug/firmware"]) + [hotplugfwdir="$detected_fwdir"]) HOTPLUGFWDIR="$hotplugfwdir" AC_SUBST(HOTPLUGFWDIR) - +AC_MSG_RESULT($HOTPLUGFWDIR) AC_OUTPUT(Makefile \ hdsploader/Makefile \ # where to put the firmware. If none of these is right, can specify where # --with-hotplug-dir if test -d /lib/firmware ; then detected_fwdir="/lib/firmware/" elif test -d /lib/hotplug/firmware ; then detected_fwdir="/lib/hotplug/firmware/" elif test -d /usr/lib/hotplug/firmware ; then detected_fwdir="/usr/lib/hotplug/firmware/" else detected_fwdir="/lib/firmware/" fi AC_ARG_WITH(hotplug-dir, [ --with-hotplug-dir Specify the hotplug firmware directory], [hotplugfwdir="$withval"], [hotplugfwdir="$detected_fwdir]) HOTPLUGFWDIR="$hotplugfwdir" AC_SUBST(HOTPLUGFWDIR) -- Eliot