Skip to contentSkip to conversation

configure: Fix unexpanded ALSA_DATA_DIR

PATCH In review Takashi Iwai 2 participants 2 messages Mar 27, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Fix unexpanded ALSA_DATA_DIR

When no --with-alsadatadir is given, configure scripts takes $datadir/alsa as the default location, while it's expanded to $prefix/data/alsa. Although ALSA_DATA_DIR is set via AC_DEFINE_UNQUOTED(), this expands only $alsadatadir itself and not about the $prefix in the content. For resolving this, we need to do eval twice.

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -1
index 1be4a70c803c..5b131e704c2f 100644
@@ -211,7 +211,7 @@ if test -z "$alsadatadir"; then
     eval dir="$datadir"
     case "$dir" in
     /*) ;;
-    *) dir="$dir"
+    *) eval dir="$dir"
     esac
     alsadatadir="$dir/alsa"
 fi
Signature · 1 line
2.16.4
Acked-by on v1 1/1
#1 lore raw

Dne 27. 03. 19 v 12:42 Takashi Iwai napsal(a):

Quoted 18 lines

When no --with-alsadatadir is given, configure scripts takes $datadir/alsa as the default location, while it's expanded to $prefix/data/alsa. Although ALSA_DATA_DIR is set via AC_DEFINE_UNQUOTED(), this expands only $alsadatadir itself and not about the $prefix in the content. For resolving this, we need to do eval twice.

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +0 -0
index 1be4a70c803c..5b131e704c2f 100644

configure.ac if test -z "$alsadatadir"; then · line 217

Quoted 8 lines
configure.ac +1 -1
@@ -211,7 +211,7 @@ if test -z "$alsadatadir"; then
     eval dir="$datadir"
     case "$dir" in
     /*) ;;
-    *) dir="$dir"
+    *) eval dir="$dir"
     esac
     alsadatadir="$dir/alsa"
 fi
Signature · 2 lines
Jaroslav Kysela <[email protected]>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.