From da316dd588c8f05f93e1b416740053c88bb7c865 Mon Sep 17 00:00:00 2001 From: axel Date: Fri, 28 Oct 2005 00:45:10 +1000 Subject: [PATCH] Do not override users sysconfdir setting darcs-hash:20051027144510-ac50b-fc670196f1ec55c9703a8c44d1411a9380a8a0cf.gz --- configure.ac | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/configure.ac b/configure.ac index 61626edea..6a7caccaf 100644 --- a/configure.ac +++ b/configure.ac @@ -35,21 +35,24 @@ else AC_SUBST( XSEL_MAN_PATH,[ ]) fi -if [[ "$prefix" = NONE ]]; then - AC_DEFINE_UNQUOTED( [PREFIX], L"/usr/local", [Installation directory]) - AC_SUBST( PREFIX, /usr/local) - AC_SUBST(sysconfdir,[/etc]) - export prefix=/usr/local -else - AC_DEFINE_UNQUOTED( [PREFIX], L"$prefix", [Installation directory]) - AC_SUBST( PREFIX, [$prefix]) - AC_SUBST(sysconfdir,[/etc]) +if test $sysconfdir = '${prefix}/etc'; then + if [[ "$prefix" = NONE ]]; then + AC_DEFINE_UNQUOTED( [PREFIX], L"/usr/local", [Installation directory]) + AC_SUBST( PREFIX, /usr/local) + AC_SUBST(sysconfdir,[/etc]) + export prefix=/usr/local + else + AC_DEFINE_UNQUOTED( [PREFIX], L"$prefix", [Installation directory]) + AC_SUBST( PREFIX, [$prefix]) + AC_SUBST(sysconfdir,[/etc]) + fi + + if echo $prefix | grep \^$HOME >/dev/null; then + AC_SUBST(sysconfdir,[$HOME/etc]) + AC_MSG_NOTICE(["Install in $HOME"]) + fi fi -if echo $prefix | grep \^$HOME >/dev/null; then - AC_SUBST(sysconfdir,[$HOME/etc]) - AC_MSG_NOTICE(["Install in $HOME"]) -fi AC_SUBST(fishdir,[/fish.d]) AC_SUBST(fishfile,[/fish]) AC_SUBST(fishinputfile,[/fish_inputrc])