summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 77c6999)
raw | patch | inline | side by side (parent: 77c6999)
author | Kalle Wallin <kaw@linux.se> | |
Mon, 7 Jun 2004 21:29:10 +0000 (21:29 +0000) | ||
committer | Kalle Wallin <kaw@linux.se> | |
Mon, 7 Jun 2004 21:29:10 +0000 (21:29 +0000) |
configure.ac | patch | blob | history | |
src/Makefile.am | patch | blob | history | |
src/ncmpc.h | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index 94e056200d1f25c31e54c0bc6a820bf690dc8c4d..c708b7febfa7bac7fd5c1606f9820a8d99cd149f 100644 (file)
--- a/configure.ac
+++ b/configure.ac
set -- $CFLAGS
-
dnl
dnl Check for types
dnl
AC_MSG_ERROR([Missing popt command line parsing library]))
-dnl Check for glib-2
+dnl Check for glib-2.4
PKG_CHECK_MODULES([GLIB],
- [glib-2.0 >= 2.2],
- ,
- AC_MSG_ERROR([glib-2.2 is required]))
+ [glib-2.0 >= 2.4],
+ glib24=yes,
+ AC_MSG_WARN([glib-2.4 is required for NLS support!]))
+if test "x$glib24" != "xyes"; then
+ PKG_CHECK_MODULES([GLIB],
+ [glib-2.0 >= 2.2],
+ nls=no,
+ AC_MSG_ERROR([glib-2.2 is required]))
+fi
+
dnl i18n
-ALL_LINGUAS=""
-AC_MSG_CHECKING([whether to include NLS support])
-AC_ARG_ENABLE([nls],
- AC_HELP_STRING([--enable-nls],
- [include natural language support @<:@default=yes@:>@]),
- [nls="$enableval"],
- [nls=yes])
-AC_MSG_RESULT([$nls])
+ALL_LINGUAS="sv"
+
+AM_NLS
+if test "x$glib24" = "xyes"; then
+ nls=$USE_NLS
+else
+ USE_NLS=no
+ AC_SUBST(USE_NLS)
+fi
+
if test "x$nls" = "xyes"; then
- ALL_LINGUAS="sv"
AM_GLIB_GNU_GETTEXT
GETTEXT_PACKAGE=$PACKAGE
AC_SUBST(GETTEXT_PACKAGE)
["${GETTEXT_PACKAGE}"],
[gettext domain])
nls=$gt_cv_have_gettext
+else
+ AM_PO_SUBDIRS
fi
diff --git a/src/Makefile.am b/src/Makefile.am
index 79822f02955fc4b47703bcb6110b5b81a2fd720a..0554098b92762611838ede0fda85885705dd2b37 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
ncmpc_headers = libmpdclient.h mpc.h options.h conf.h command.h screen.h \
screen_utils.h screen_play.h screen_file.h screen_search.h \
- screen_clock.h screen_help.h list_window.h colors.h support.h \
+ screen_help.h list_window.h colors.h support.h \
wreadln.h ncmpc.h
ncmpc_SOURCES = libmpdclient.c main.c mpc.c options.c conf.c command.c \
diff --git a/src/ncmpc.h b/src/ncmpc.h
index bc6c9136a08be15395b82ada5eec47accabc28d2..2708aac50873b1d3a5539707cc1ec8d804550d12 100644 (file)
--- a/src/ncmpc.h
+++ b/src/ncmpc.h
#endif
/* i18n */
-#ifdef ENABLE_NLS
+#ifdef HAVE_LOCALE_H
#include <locale.h>
+#endif
+#ifdef ENABLE_NLS
#include <libintl.h>
#include <glib/gi18n.h>
#else