aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-25 15:42:17 +0200
committerMax Kellermann <max@duempel.org>2008-09-25 15:42:17 +0200
commit9ccdbcf58f7cda5fc04b8f1a801aeb18b61e1ca9 (patch)
tree609f81a0c65ff055553de0952127640f0726eabe
parent822c07804d23e711fca6e76aa941932a94c013f7 (diff)
downloadmpd-9ccdbcf58f7cda5fc04b8f1a801aeb18b61e1ca9.tar.gz
mpd-9ccdbcf58f7cda5fc04b8f1a801aeb18b61e1ca9.tar.xz
mpd-9ccdbcf58f7cda5fc04b8f1a801aeb18b61e1ca9.zip
configure: fix default lyrics plugin directory
When the user does not specify "--prefix", ${prefix} is "NONE". This breaks the default lyrics plugin directory, which was "${prefix}/lib/ncmpc/lyrics". Fall back to ${ac_default_prefix} if ${prefix} is NONE.
Diffstat (limited to '')
-rw-r--r--configure.ac9
1 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 3fa9ca6b7..681a80ac9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -260,7 +260,14 @@ AC_ARG_WITH([lyrics-plugin-dir],
AC_HELP_STRING([[--with-lyrics-plugin-dir[=DIRECTORY]]],
[Directory where lyrics plugins are stored @<:@default=PREFIX/lib/ncmpc/lyrics@:>@]),
[lyrics_plugin_dir=$withval],
- [lyrics_plugin_dir="$prefix/lib/ncmpc/lyrics"])
+ [lyrics_plugin_dir=""])
+if test "x${lyrics_plugin_dir}" = "x"; then
+ if test "x${prefix}" = "xNONE"; then
+ lyrics_plugin_dir="${ac_default_prefix}/lib/ncmpc/lyrics"
+ else
+ lyrics_plugin_dir="${prefix}/lib/ncmpc/lyrics"
+ fi
+fi
AC_DEFINE_UNQUOTED([LYRICS_PLUGIN_DIR], ["$lyrics_plugin_dir"],
[Directory to search for lyrics plugins])
AC_SUBST(lyrics_plugin_dir)