diff options
author | Max Kellermann <max@duempel.org> | 2008-12-25 04:15:44 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-12-25 04:15:44 +0100 |
commit | c39eb2cdf399c740c24884997364cf84c64fd46b (patch) | |
tree | cb27e0df8199ce28960cd316347783d519dab357 /configure.ac | |
parent | 634bed2e83799f604a60bfef62d5e240ea02511c (diff) | |
download | mpd-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 'configure.ac')
-rw-r--r-- | configure.ac | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index 0a1d68d87..a6884456d 100644 --- a/configure.ac +++ b/configure.ac @@ -18,14 +18,6 @@ ALL_LINGUAS="es da de fr gl no ru sk sv hu" set -- $CFLAGS -dnl -dnl Check for headers -dnl - -AC_CHECK_HEADER([locale.h], - AC_DEFINE([HAVE_LOCALE_H], [1], [locale.h]), - ,) - dnl dnl ncmpc-mini @@ -42,10 +34,12 @@ if test "x$enable_mini" = xyes; then AC_DEFINE([NCMPC_MINI], [1], [Build ncmpc-mini, which disables lots of features]) auto=no disable_mini=no + auto_mini=no ncurses=ncurses else auto=auto disable_mini=yes + auto_mini=auto ncurses=auto fi @@ -139,6 +133,28 @@ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.4],, dnl i18n +AC_ARG_ENABLE([locale], + AC_HELP_STRING([--disable-locale], + [Disable locale support (default: auto)]), + [enable_locale=$enableval], + [enable_locale=$auto_mini]) + +if test x$enable_locale = xyes; then + AC_CHECK_HEADER([locale.h],, + [AC_MSG_ERROR(locale.h is unavailable)]) +fi + +if test x$enable_locale = xauto; then + AC_CHECK_HEADER([locale.h], + [enable_locale=yes], + [enable_locale=no]) +fi + +if test x$enable_locale = xyes; then + AC_DEFINE([ENABLE_LOCALE], [1], [Locale support is enabled]) +fi + + AM_NLS nls=$USE_NLS |