summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcarlosg <carlosg>2006-10-12 11:49:06 +0000
committercarlosg <carlosg>2006-10-12 11:49:06 +0000
commitd543c5e88c3241e621705502a0b031c8e083996f (patch)
treef86075639b0ff6653f8e32a89f1f260a070e8e69
parente126c7b798a356c5136b6db0eecc05180e22fae8 (diff)
2006-10-12 Carlos Garnacho <carlosg@gnome.org>C_DISPATCHER_BRANCHPOINT
* configure.in: expand properly datadir and sysconfdir
-rw-r--r--ChangeLog4
-rw-r--r--configure.in23
2 files changed, 24 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index c59fa8d..7b90309 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-10-12 Carlos Garnacho <carlosg@gnome.org>
+
+ * configure.in: expand properly datadir and sysconfdir
+
2006-10-09 Carlos Garnacho <carlosg@gnome.org>
* Network/Ifaces.pm: don't corrupt wireless essid and key.
diff --git a/configure.in b/configure.in
index e834093..28eccba 100644
--- a/configure.in
+++ b/configure.in
@@ -13,16 +13,33 @@ if test "x$prefix" = "xNONE"; then
prefix=$ac_default_prefix;
fi
+# This macro expands DIR and assigns it to RET.
+# If DIR is NONE, then it's replaced by DEFAULT.
+#
+# Based on AC_DEFINE_DIR
+#
+# Examples:
+#
+# AC_EXPAND(prefix, "/usr/local", expanded_prefix)
+
+AC_DEFUN([AC_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`
+])
+
dnl get expanded paths
DATADIR_TMP="${datadir}"
-EXPANDED_DATADIR=`eval echo $DATADIR_TMP`
+AC_EXPAND(datadir,"NONE",EXPANDED_DATADIR)
AC_SUBST(EXPANDED_DATADIR)
SYSCONFDIR_TMP="${sysconfdir}"
-EXPANDED_SYSCONFDIR=`eval echo $SYSCONFDIR_TMP`
+AC_EXPAND(sysconfdir,"NONE",EXPANDED_SYSCONFDIR)
AC_SUBST(EXPANDED_SYSCONFDIR)
-
dnl scriptsdir & filesdir
scriptsdir="${EXPANDED_DATADIR}/system-tools-backends-2.0/scripts"
filesdir="${EXPANDED_DATADIR}/system-tools-backends-2.0/files"