diff --git a/configure.in b/configure.in index 042e6cf..1e86e89 100644 --- a/configure.in +++ b/configure.in @@ -28,7 +28,6 @@ else fi AC_DEFINE_UNQUOTED(PREFIX, "$EDE_INSTALL_DIR", [Default installation place]) - EDE_OPTIM_FLAGS="" EDE_DEBUG_FLAGS="" @@ -242,6 +241,9 @@ else AC_MSG_RESULT(no) fi +dnl expand variables before EDE_INIT_JAM convert them to jam variables +EDE_EXPAND(sysconfdir, "NONE", my_sysconfdir) + EDE_INIT_JAM AC_SUBST(EDE_VERSION) @@ -258,6 +260,7 @@ AC_SUBST(CURL_CFLAGS) AC_SUBST(CURL_LIBS) AC_SUBST(LARGEFILE) AC_SUBST(XKB_LIBS) +AC_SUBST(my_sysconfdir) AC_OUTPUT([ Jamconfig diff --git a/data/startede.in b/data/startede.in index a04b7fc..0c45ef2 100644 --- a/data/startede.in +++ b/data/startede.in @@ -14,6 +14,7 @@ # http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html PREFIX="@prefix@" +SYSCONFDIR="@my_sysconfdir@" if [ "x$XDG_DATA_HOME" = "x" ]; then XDG_DATA_HOME="$HOME/.local/share" @@ -32,7 +33,7 @@ if [ "x$XDG_DATA_DIRS" = "x" ]; then fi if [ "x$XDG_CONFIG_DIRS" = "x" ]; then - XDG_CONFIG_DIRS="$PREFIX/etc/xdg" + XDG_CONFIG_DIRS="$SYSCONFDIR/xdg" fi # prefix for applications.menu diff --git a/m4/expand.m4 b/m4/expand.m4 new file mode 100644 index 0000000..8771f56 --- /dev/null +++ b/m4/expand.m4 @@ -0,0 +1,12 @@ +dnl +dnl found in https://jim.sh/svn/jim/vendor/sdcc/2.5.0/configure.in +dnl Examples: AC_EXPAND(prefix, "/usr/local", expanded_prefix) + +AC_DEFUN([EDE_EXPAND], [ + test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + ac_expand=[$]$1 + test "x$ac_expand" = xNONE && ac_expand="[$]$2" + ac_expand=`eval echo [$]ac_expand` + $3=`eval echo [$]ac_expand` +])