changeset 882:c3c2f7a0c5d5

autoconf: use datadir, not datarootdir Fix changeset b38760d9ec2d, I didn't see there was a datadir variable.
author Mikael Berthe <mikael@lilotux.net>
date Sat, 27 May 2006 18:53:56 +0200
parents 618967a008a2
children 0aa9015f06df
files mcabber/configure.ac mcabber/src/help.c
diffstat 2 files changed, 8 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- 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 */
 }