Code

configure.ac: added --disable-multibyte
[ncmpc.git] / configure.ac
index a6884456dcc2d80534e5248fb9b60392aa7743cc..d9748b9472de4e567e0b1712ad2df4ff6a25cb25 100644 (file)
@@ -125,6 +125,21 @@ if test "x$enable_wide" = "xyes" ; then
     AC_DEFINE([ENABLE_WIDE], [1], [Enable wide character support])
 fi
 
+dnl multi-byte character support
+
+AC_ARG_ENABLE([multibyte],
+       AC_HELP_STRING([--disable-multibyte],
+               [Disable multibyte character support (default: enabled)]),
+               [enable_multibyte=$enableval],
+               [enable_multibyte=$disable_mini])
+
+if test x$enable_multibyte = xyes; then
+       AC_DEFINE([ENABLE_MULTIBYTE], [1], [Enable multibyte character support])
+else
+       if test x$enable_wide = xyes; then
+               AC_MSG_WARN(wide characters without multibyte characters makes little sense)
+       fi
+fi
 
 dnl Check for glib-2.4
 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.4],,
@@ -154,19 +169,21 @@ if test x$enable_locale = xyes; then
        AC_DEFINE([ENABLE_LOCALE], [1], [Locale support is enabled])
 fi
 
+if test x$enable_mini != xyes; then
+       AM_NLS
+else
+       USE_NLS=no
+fi
 
-AM_NLS
-nls=$USE_NLS
-
-if test "x$nls" = "xyes"; then
+if test x$USE_NLS = xyes; then
    AM_GLIB_GNU_GETTEXT
    GETTEXT_PACKAGE=$PACKAGE
    AC_SUBST(GETTEXT_PACKAGE)
    AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], 
                       ["${GETTEXT_PACKAGE}"], 
                       [gettext domain])
-  nls=$gt_cv_have_gettext
-  if test "x$nls" != "xyes"; then
+       USE_NLS=$gt_cv_have_gettext
+       if test x$USE_NLS != xyes; then
      AC_MSG_WARN([NLS support disabled!])
   fi
 else