From: Takashi Iwai Subject: Re: [ALSA patch] [PATCH] [-, JACK, plugin, 1/1] configure: use $prefix/etc instead of /etc Date: Fri, 22 Mar 2019 12:06:08 +0100 Message-ID: References: <20190319190425.14681-1-gnidorah@ya.ru> <20190320173047.16808-1-gnidorah@ya.ru> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 25117F8078F for ; Fri, 22 Mar 2019 12:06:08 +0100 (CET) In-Reply-To: <20190320173047.16808-1-gnidorah@ya.ru> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" To: Alex Ivanov Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org On Wed, 20 Mar 2019 18:30:47 +0100, Alex Ivanov wrote: > > Use $sysconfdir as prefix for ALSA_LCONF_DIR by default. Otherwise install > fails on non-FHS distros. > > Signed-off-by: Alex Ivanov > --- > configure.ac | 19 ++++++++++++++++++- > 1 file changed, 18 insertions(+), 1 deletion(-) > > diff --git a/configure.ac b/configure.ac > index 5b80585..7b8dd66 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -219,6 +219,23 @@ AC_DEFINE_UNQUOTED(ALSA_DATA_DIR, "$alsadatadir", [directory containing ALSA dat > ALSA_DATA_DIR="$alsadatadir" > AC_SUBST(ALSA_DATA_DIR) > > +dnl ALSA configuration directory > +AC_ARG_WITH(alsaconfdir, > + AS_HELP_STRING([--with-alsaconfdir=dir], > + [path where ALSA configuration files are stored]), > + alsaconfdir="$withval", alsaconfdir="") > +if test -z "$alsaconfdir"; then > + eval dir="$sysconfdir" > + case "$dir" in > + /*) ;; > + *) dir="$dir" > + esac > + alsaconfdir="$dir/alsa" > +fi > +AC_DEFINE_UNQUOTED(ALSA_CONF_DIR, "$alsaconfdir", [directory containing ALSA configuration files]) > +ALSA_CONF_DIR="$alsaconfdir" > +AC_SUBST(ALSA_CONF_DIR) Yet another option is way too confusing, IMO. > + > dnl ALSA add-on global config directory > AC_ARG_WITH(alsagconfdir, > AS_HELP_STRING([--with-alsagconfdir=dir], > @@ -237,7 +254,7 @@ AC_ARG_WITH(alsalconfdir, > [path where ALSA local add-on config files are stored]), > alsalconfdir="$withval", alsalconfdir="") > if test -z "$alsalconfdir"; then > - alsalconfdir="/etc/alsa/conf.d" > + alsalconfdir="$ALSA_CONF_DIR/conf.d" Let's add the $sysconfdir usage here instead of adding a new --with-*. Care to resubmit with that change? thanks, Takashi