From: Max Kellermann Date: Thu, 25 Sep 2008 13:42:17 +0000 (+0200) Subject: configure: fix default lyrics plugin directory X-Git-Tag: v0.12_alpha1~169 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9ccdbcf58f7cda5fc04b8f1a801aeb18b61e1ca9;p=ncmpc.git 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. --- diff --git a/configure.ac b/configure.ac index 3fa9ca6..681a80a 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)