]> git.alsa-project.org Git - alsa-firmware.git/commitdiff
Better detection of default firmware installation directory
authorEliot Blennerhassett <eblennerhassett@audioscience.com>
Fri, 16 Jun 2006 10:09:43 +0000 (12:09 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 16 Jun 2006 10:09:43 +0000 (12:09 +0200)
Check the directories to determine more suitable default firmware
installation path.  Use /lib/firmware as the fallback since recent
systems use it as default.

Also fixed Makefile.am for missing asihpi directory.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Makefile.am
README
configure.in

index 43b650b357259a59e62f36e565287c1b4157de3b..c2cb9a1f28997f28d12f025fa62a39f928bf706d 100644 (file)
@@ -1,6 +1,6 @@
 AUTOMAKE_OPTIONS = 1.3 foreign
 
-SUBDIRS = hdsploader mixartloader pcxhrloader usx2yloader vxloader echoaudio
+SUBDIRS = hdsploader mixartloader pcxhrloader usx2yloader vxloader echoaudio asihpi
 
 EXTRA_DIST = depcomp
 
diff --git a/README b/README
index 683de59086e4bd0ec04a325022f7934915d06122..1388cc3ad119c2afaa15a6ee7080a6f08c99de09 100644 (file)
--- a/README
+++ b/README
@@ -22,9 +22,10 @@ For the old ALSA fw loader, specify the same prefix option given to
 the alsa-tools configure script, too, in order to keep the
 installation directories consistent.
 
-The default directory for hotplug firmware data files is
-/usr/lib/hotplug/firmware.  You can change to another path via
---with-hotplug-dir option.
+The default directory for hotplug firmware data files is /lib/firmware.
+(or if existing /lib/hotplug/firmware or /usr/lib/hotplug/firmware are 
+found they are used)
+You can change to another path via --with-hotplug-dir option.
 
 
 LICENSE AND COPYRIGHT
index 64016a077b4745f6d1751560029f64005e92d313..4a342461ffd2db5e61c585d78c7d59c81939e152 100644 (file)
@@ -29,13 +29,26 @@ AM_CONDITIONAL(USE_LOADER, test "$loader" = "yes")
 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 \