From bc2faaf75f60baf1afaf8678270a121e0ede8352 Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Mon, 10 Apr 2006 17:15:37 +0000 Subject: [PATCH] fix default config file location, ticket #63 --- configure.in | 12 ++++++++---- contrib/Makefile.am | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/configure.in b/configure.in index e9d71410..750a69b3 100644 --- a/configure.in +++ b/configure.in @@ -19,10 +19,14 @@ AC_CHECK_FUNCS(strptime) AC_CHECK_FUNCS(strtok_r) AM_CONDITIONAL(COND_REND_OSX,false) -if test "x$prefix" != xNONE; then - CONFFILE="$prefix/etc/mt-daapd.conf" -else - CONFFILE="/etc/mt-daapd.conf" +if test "x$prefix" != xNONE -a "x$prefix" != "x/usr"; then + CONFFILE="$prefix/etc/mt-daapd.conf" +else + if test "x$prefix" == "xNONE"; then + CONFFILE="/usr/local/etc/mt-daapd.conf" + else + CONFFILE="/etc/mt-daapd.conf" + fi fi diff --git a/contrib/Makefile.am b/contrib/Makefile.am index 5f9ae4fa..e9d3445b 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -8,7 +8,7 @@ bin_SCRIPTS=mt-daapd-ssc.sh dbdir="/var/cache/mt-daapd" -mt-daapd.conf: mt-daapd.conf.templ +mt-daapd.conf: mt-daapd.conf.templ ../config.h if [ "$(prefix)" == "/usr" ]; then \ sed -e s,[@]prefix[@],$(prefix),g -e s,[@]dbdir[@],/var/cache/mt-daapd,g $< >$@; \ else \