build: prepend ${PREFIX} to SYSCONFDIR if not set (FS#468)

Also fixes what seemed like a typo in the env checking for
XDG_CONFIG_DIR.

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Nikos Ntarmos 2009-04-01 17:56:02 +02:00 committed by Julien Danjou
parent 49a9226d83
commit c10c38a31f
1 changed files with 2 additions and 2 deletions

View File

@ -220,13 +220,13 @@ endif()
if(DEFINED SYSCONFDIR) if(DEFINED SYSCONFDIR)
set(SYSCONFDIR ${SYSCONFDIR} CACHE PATH "config directory") set(SYSCONFDIR ${SYSCONFDIR} CACHE PATH "config directory")
else() else()
set(SYSCONFDIR /etc CACHE PATH "config directory") set(SYSCONFDIR ${PREFIX}/etc CACHE PATH "config directory")
endif() endif()
#If an XDG Config Dir is specificed, use it instead #If an XDG Config Dir is specificed, use it instead
#of the default XDG configuration dir. #of the default XDG configuration dir.
if(DEFINED XDG_CONFIG_DIR) if(DEFINED XDG_CONFIG_DIR)
set(XDG_CONFIG_DIR ${XDG_CONFIG_SYS} CACHE PATH "xdg config directory") set(XDG_CONFIG_DIR ${XDG_CONFIG_DIR} CACHE PATH "xdg config directory")
else() else()
set(XDG_CONFIG_DIR ${SYSCONFDIR}/xdg CACHE PATH "xdg config directory") set(XDG_CONFIG_DIR ${SYSCONFDIR}/xdg CACHE PATH "xdg config directory")
endif() endif()