autoconf: use datadir, not datarootdir
Fix changeset b38760d9ec2d, I didn't see there was a datadir variable.
--- a/mcabber/configure.ac Sat May 27 17:35:19 2006 +0200
+++ b/mcabber/configure.ac Sat May 27 18:53:56 2006 +0200
@@ -113,11 +113,9 @@
AC_DEFINE(BUILD_JABBER, 1, [build with jabber support])
-# Export $datarootdir to the source tree.
-if test x"${datarootdir}" != x""; then
- AC_DEFINE_DIR(DATA_ROOT_DIR, "${datarootdir}", [Data files directory])
-elif test x"${datadir}" != x""; then
- AC_DEFINE_DIR(DATA_ROOT_DIR, "${datadir}", [Data files directory])
+# Export $datadir to the source tree.
+if test x"${datadir}" != x""; then
+ AC_DEFINE_DIR(DATA_DIR, "${datadir}", [Data files directory])
fi
AC_ARG_ENABLE(debug,
--- a/mcabber/src/help.c Sat May 27 17:35:19 2006 +0200
+++ b/mcabber/src/help.c Sat May 27 18:53:56 2006 +0200
@@ -35,7 +35,7 @@
// Return the language code string (a 2-letters string).
static const char *get_lang(void) {
static const char *lang_str = DEFAULT_LANG;
-#ifdef DATA_ROOT_DIR
+#ifdef DATA_DIR
static char lang[3];
const char *opt_l;
opt_l = settings_opt_get("lang");
@@ -44,7 +44,7 @@
mc_strtolower(lang);
lang_str = lang;
}
-#endif /* DATA_ROOT_DIR */
+#endif /* DATA_DIR */
return lang_str;
}
@@ -54,7 +54,7 @@
// Return 0 in case of success.
int help_process(char *string)
{
-#ifndef DATA_ROOT_DIR
+#ifndef DATA_DIR
scr_LogPrint(LPRINT_NORMAL, "Help isn't available.");
return -1;
#else
@@ -75,7 +75,7 @@
// Look for help file
lang = get_lang();
- helpfiles_dir = g_strdup_printf("%s/mcabber/help", DATA_ROOT_DIR);
+ helpfiles_dir = g_strdup_printf("%s/mcabber/help", DATA_DIR);
if (string && *string) {
p = g_strdup(string);
mc_strtolower(p);
@@ -109,7 +109,7 @@
g_free(data);
return 0;
-#endif /* DATA_ROOT_DIR */
+#endif /* DATA_DIR */
}