* [PATCH] [-, JACK, plugin, 1/1] configure: use $prefix/etc instead of /etc
@ 2019-03-19 19:04 Alex Ivanov
[not found] ` <20190320173047.16808-1-gnidorah@ya.ru>
0 siblings, 1 reply; 5+ messages in thread
From: Alex Ivanov @ 2019-03-19 19:04 UTC (permalink / raw)
To: alsa-devel
Use $sysconfdir as prefix for ALSA_LCONF_DIR by default. Otherwise install
fails on non-FHS distros.
Signed-off-by: Alex Ivanov <gnidorah@ya.ru>
---
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)
+
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"
fi
AC_DEFINE_UNQUOTED(ALSA_LCONF_DIR, "$alsalconfdir", [directory containing local ALSA add-on config files])
ALSA_LCONF_DIR="$alsalconfdir"
--
2.19.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [ALSA patch] [PATCH] [-, JACK, plugin, 1/1] configure: use $prefix/etc instead of /etc
[not found] ` <20190320173047.16808-1-gnidorah@ya.ru>
@ 2019-03-22 11:06 ` Takashi Iwai
2019-03-22 15:44 ` [PATCH] [-, JACK, plugin, 1/1] configure: use /etc " Alex Ivanov
0 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2019-03-22 11:06 UTC (permalink / raw)
To: Alex Ivanov; +Cc: alsa-devel
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 <gnidorah@ya.ru>
> ---
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] [-, JACK, plugin, 1/1] configure: use /etc instead of /etc
2019-03-22 11:06 ` [ALSA patch] " Takashi Iwai
@ 2019-03-22 15:44 ` Alex Ivanov
2019-03-22 17:52 ` Takashi Iwai
0 siblings, 1 reply; 5+ messages in thread
From: Alex Ivanov @ 2019-03-22 15:44 UTC (permalink / raw)
To: tiwai, alsa-devel
Hi, Takashi.
Sure. Here we go.
Signed-off-by: Alex Ivanov <gnidorah@ya.ru>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 5b80585..b52923c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -237,7 +237,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="$sysconfdir/alsa/conf.d"
fi
AC_DEFINE_UNQUOTED(ALSA_LCONF_DIR, "$alsalconfdir", [directory containing local ALSA add-on config files])
ALSA_LCONF_DIR="$alsalconfdir"
--
2.19.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] [-, JACK, plugin, 1/1] configure: use /etc instead of /etc
2019-03-22 15:44 ` [PATCH] [-, JACK, plugin, 1/1] configure: use /etc " Alex Ivanov
@ 2019-03-22 17:52 ` Takashi Iwai
2019-03-23 5:20 ` [PATCH v3] " Alex Ivanov
0 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2019-03-22 17:52 UTC (permalink / raw)
To: Alex Ivanov; +Cc: alsa-devel
On Fri, 22 Mar 2019 16:44:10 +0100,
Alex Ivanov wrote:
>
> Hi, Takashi.
>
> Sure. Here we go.
>
> Signed-off-by: Alex Ivanov <gnidorah@ya.ru>
Erm, please keep more context in the patch description.
> ---
> configure.ac | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index 5b80585..b52923c 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -237,7 +237,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="$sysconfdir/alsa/conf.d"
> fi
I tested this change, and it resulted in a bad string
#define ALSA_LCONF_DIR "${prefix}/etc/alsa/conf.d"
Actually the same bug is found in other places, e.g.
#define ALSA_DATA_DIR "${prefix}/share/alsa"
Hmm.
Takashi
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3] [-, JACK, plugin, 1/1] configure: use /etc instead of /etc
2019-03-22 17:52 ` Takashi Iwai
@ 2019-03-23 5:20 ` Alex Ivanov
0 siblings, 0 replies; 5+ messages in thread
From: Alex Ivanov @ 2019-03-23 5:20 UTC (permalink / raw)
To: tiwai, alsa-devel
Use $sysconfdir as prefix for ALSA_LCONF_DIR by default. Otherwise install
fails on non-FHS distros.
Signed-off-by: Alex Ivanov <gnidorah@ya.ru>
---
configure.ac | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 5b80585..1be4a70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -237,7 +237,12 @@ 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"
+ eval dir="$sysconfdir"
+ case "$dir" in
+ /*) ;;
+ *) dir="$dir"
+ esac
+ alsalconfdir="$dir/alsa/conf.d"
fi
AC_DEFINE_UNQUOTED(ALSA_LCONF_DIR, "$alsalconfdir", [directory containing local ALSA add-on config files])
ALSA_LCONF_DIR="$alsalconfdir"
--
2.19.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-03-23 5:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-19 19:04 [PATCH] [-, JACK, plugin, 1/1] configure: use $prefix/etc instead of /etc Alex Ivanov
[not found] ` <20190320173047.16808-1-gnidorah@ya.ru>
2019-03-22 11:06 ` [ALSA patch] " Takashi Iwai
2019-03-22 15:44 ` [PATCH] [-, JACK, plugin, 1/1] configure: use /etc " Alex Ivanov
2019-03-22 17:52 ` Takashi Iwai
2019-03-23 5:20 ` [PATCH v3] " Alex Ivanov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.