aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-12-25 04:15:44 +0100
committerMax Kellermann <max@duempel.org>2008-12-25 04:15:44 +0100
commitc39eb2cdf399c740c24884997364cf84c64fd46b (patch)
treecb27e0df8199ce28960cd316347783d519dab357 /src
parent634bed2e83799f604a60bfef62d5e240ea02511c (diff)
downloadmpd-c39eb2cdf399c740c24884997364cf84c64fd46b.tar.gz
mpd-c39eb2cdf399c740c24884997364cf84c64fd46b.tar.xz
mpd-c39eb2cdf399c740c24884997364cf84c64fd46b.zip
configure.ac: added --disable-locale option
Make locale.h mandatory. --disable-locale disables the locale.h check.
Diffstat (limited to 'src')
-rw-r--r--src/charset.c6
-rw-r--r--src/charset.h2
-rw-r--r--src/main.c6
-rw-r--r--src/options.c3
4 files changed, 10 insertions, 7 deletions
diff --git a/src/charset.c b/src/charset.c
index 69e15eb6e..b948636f0 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -23,7 +23,7 @@
#include <string.h>
#include <glib.h>
-#if defined(HAVE_LOCALE_H) && !defined(NCMPC_MINI)
+#ifdef ENABLE_LOCALE
static bool noconvert = true;
static const char *charset;
@@ -62,7 +62,7 @@ utf8_width(const char *str)
char *
utf8_to_locale(const char *utf8str)
{
-#if defined(HAVE_LOCALE_H) && !defined(NCMPC_MINI)
+#ifdef ENABLE_LOCALE
gchar *str;
assert(utf8str != NULL);
@@ -85,7 +85,7 @@ utf8_to_locale(const char *utf8str)
char *
locale_to_utf8(const char *localestr)
{
-#if defined(HAVE_LOCALE_H) && !defined(NCMPC_MINI)
+#ifdef ENABLE_LOCALE
gchar *str;
assert(localestr != NULL);
diff --git a/src/charset.h b/src/charset.h
index 4dfe13f3f..0999e8ef3 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -25,7 +25,7 @@
#include <stdbool.h>
#include <stddef.h>
-#if defined(HAVE_LOCALE_H) && !defined(NCMPC_MINI)
+#ifdef ENABLE_LOCALE
const char *
charset_init(void);
#endif
diff --git a/src/main.c b/src/main.c
index 53ea8c592..a0f7c0c99 100644
--- a/src/main.c
+++ b/src/main.c
@@ -45,7 +45,7 @@
#include <signal.h>
#include <string.h>
-#ifdef HAVE_LOCALE_H
+#ifdef ENABLE_LOCALE
#include <locale.h>
#endif
@@ -363,7 +363,7 @@ int
main(int argc, const char *argv[])
{
struct sigaction act;
-#if defined(HAVE_LOCALE_H) && !defined(NCMPC_MINI)
+#ifdef ENABLE_LOCALE
const char *charset = NULL;
#endif
GIOChannel *keyboard_channel;
@@ -372,7 +372,7 @@ main(int argc, const char *argv[])
GIOChannel *lirc_channel = NULL;
#endif
-#if defined(HAVE_LOCALE_H) && !defined(NCMPC_MINI)
+#ifdef ENABLE_LOCALE
/* time and date formatting */
setlocale(LC_TIME,"");
/* care about sorting order etc */
diff --git a/src/options.c b/src/options.c
index 8c62e4b83..8a2ced94a 100644
--- a/src/options.c
+++ b/src/options.c
@@ -168,6 +168,9 @@ handle_option(int c, const char *arg)
#ifdef ENABLE_WIDE
" wide"
#endif
+#ifdef ENABLE_LOCALE
+ " locale"
+#endif
#ifdef ENABLE_NLS
" nls"
#endif