# HG changeset patch # User Mikael Berthe # Date 1148727079 -7200 # Node ID b38760d9ec2d786376636b5471c8cd719ecf09c8 # Parent e583d617838a4a1436efaf81ef79ca6db5fd1691 autoconf: Remove --with-datadir, use built-in --datarootdir option diff -r e583d617838a -r b38760d9ec2d mcabber/configure.ac --- a/mcabber/configure.ac Sat May 27 00:05:17 2006 +0200 +++ b/mcabber/configure.ac Sat May 27 12:51:19 2006 +0200 @@ -113,11 +113,9 @@ AC_DEFINE(BUILD_JABBER, 1, [build with jabber support]) -AC_ARG_WITH(datadir, - [AC_HELP_STRING(--with-datadir, Read-only data (help files))], - datadir=$withval, datadir="") -if test x"${datadir}" != x""; then - AC_DEFINE_UNQUOTED(DATA_DIR, "${datadir}", [Data files directory]) +# Export $datarootdir to the source tree. +if test x"${datarootdir}" != x""; then + AC_DEFINE_UNQUOTED(DATA_ROOT_DIR, "${datarootdir}", [Data files directory]) fi AC_ARG_ENABLE(debug, diff -r e583d617838a -r b38760d9ec2d mcabber/src/help.c --- a/mcabber/src/help.c Sat May 27 00:05:17 2006 +0200 +++ b/mcabber/src/help.c Sat May 27 12:51:19 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_DIR +#ifdef DATA_ROOT_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_DIR */ +#endif /* DATA_ROOT_DIR */ return lang_str; } @@ -54,7 +54,7 @@ // Return 0 in case of success. int help_process(char *string) { -#ifndef DATA_DIR +#ifndef DATA_ROOT_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_DIR); + helpfiles_dir = g_strdup_printf("%s/mcabber/help", DATA_ROOT_DIR); if (string && *string) { p = g_strdup(string); mc_strtolower(p); @@ -109,7 +109,7 @@ g_free(data); return 0; -#endif /* DATA_DIR */ +#endif /* DATA_ROOT_DIR */ }