[PATCH] Better detection of default firmware installation directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <eblennerhassett@xxxxxxxxxxxxxxxx>

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


_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux