From 6f13189c49c6d6835938f9df806f52d7303fbd64 Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Sun, 21 Apr 2013 09:00:29 -0300 Subject: [PATCH] Fix configuration file search path Signed-off-by: Claudio Matsuoka --- Changelog | 7 ++++--- configure.ac | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Changelog b/Changelog index 6617220..3ff2717 100644 --- a/Changelog +++ b/Changelog @@ -1,12 +1,13 @@ Stable versions --------------- -4.0.3 (20130420): +4.0.3 (20130421): - Fix native-endian coreaudio output (reported by Misty De Meo) - Fix MinGW32 build (reported by vaseleos0) - Fix Cygwin build (reported by Benjamin Shadwick) - - Fix module-specifc flag settings to override build-in quirks - (requires libxmp 4.1 or later) + - Fix module-specifc flags to override built-in quirks (requires + libxmp 4.1 or later) + - Don't place configuration file in places like /usr/local/etc New features requested by Benjamin Shadwick: - Add commands '<' and '>' to jump to previous/next sequence diff --git a/configure.ac b/configure.ac index e535599..71e9cc7 100644 --- a/configure.ac +++ b/configure.ac @@ -20,6 +20,20 @@ if test "$libxmp_path" != ""; then LIBS="${LIBS} -L${libxmp_path}/lib" fi +dnl Don't use things like /usr/etc or /usr/var + +fix_prefix=no +if test "x$prefix" = xNONE; then + fix_prefix=yes +elif test "x$prefix" = x/usr -o "x$prefix" = x/usr/local; then + fix_prefix=yes +fi + +if test $fix_prefix = yes -a $sysconfdir = '${prefix}/etc'; then + sysconfdir=/etc + localstatedir=/var +fi + AC_DEFUN([AC_CHECK_DEFINED],[ AS_VAR_PUSHDEF([ac_var],[ac_cv_defined_$1])dnl AC_CACHE_CHECK([for $1 defined], ac_var,