From c7b169d62f32a819d1fdbc098ef112d0161b7f6f Mon Sep 17 00:00:00 2001 From: Eliot Blennerhassett Date: Fri, 16 Jun 2006 12:09:43 +0200 Subject: [PATCH] Better detection of default firmware installation directory 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 --- Makefile.am | 2 +- README | 7 ++++--- configure.in | 17 +++++++++++++++-- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index 43b650b..c2cb9a1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 683de59..1388cc3 100644 --- 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 diff --git a/configure.in b/configure.in index 64016a0..4a34246 100644 --- a/configure.in +++ b/configure.in @@ -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 \ -- 2.47.1