~mhrheaume/network-manager-applet/eap-connect-button

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Jiří Klimeš
  • Date: 2011-09-13 14:11:58 UTC
  • Revision ID: git-v1:2f821638bcfc02cf6a81c11ed5f46b84018b0631
po/build: use iso-codes package to get translated country names (bgo #658653)

'iso-codes' provides ISO country, language, script and currency codes and their
translations in gettext format.
Even it's another dependency, it's very convenient, because there's no need to
duplicate translations of countries in nm-aplet.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
AC_PROG_CC
22
22
AM_PROG_CC_C_O
23
23
AC_PROG_INSTALL
 
24
PKG_PROG_PKG_CONFIG
24
25
 
25
26
dnl Define _GNU_SOURCE for various things like strcasestr()
26
27
AC_GNU_SOURCE
57
58
AC_SUBST(GETTEXT_PACKAGE)
58
59
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
59
60
AM_GLIB_GNU_GETTEXT
60
 
# for translation of country names from /usr/share/zoneinfo/iso3166.tab
61
 
TRANSLATE_COUNTRY_NAMES([po])
 
61
 
 
62
# Check for iso-codes for country names translation
 
63
AC_MSG_CHECKING([whether to disable iso-codes at build-time])
 
64
AC_ARG_ENABLE([iso-codes],
 
65
    AS_HELP_STRING([--disable-iso-codes],[do not check for iso-codes at build-time]),
 
66
    [],[disable_iso_codes_check=no])
 
67
if test x$disable_iso_codes_check = xno ; then
 
68
    AC_MSG_RESULT([no])
 
69
else
 
70
    AC_MSG_RESULT([yes])
 
71
fi
 
72
 
 
73
if test x$disable_iso_codes_check = "xno" ; then
 
74
    AC_MSG_CHECKING([whether iso-codes has iso_3166 domain])
 
75
    if $PKG_CONFIG --variable=domains iso-codes | grep iso_3166 >/dev/null ; then
 
76
        AC_MSG_RESULT([yes])
 
77
    else
 
78
        AC_MSG_RESULT([no])
 
79
    fi
 
80
    AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["`$PKG_CONFIG --variable=prefix iso-codes`"],[ISO codes prefix])
 
81
    PKG_CHECK_MODULES(ISO_CODES, [iso-codes],
 
82
        [],
 
83
        [echo -e "\n$ISO_CODES_PKG_ERRORS.\n"
 
84
         echo "Consider installing the package or adjusting the PKG_CONFIG_PATH environment variable."
 
85
         echo "You can also disable build-time check for 'iso-codes' via --disable-iso-codes";
 
86
         exit 1;])
 
87
else
 
88
    AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["$prefix"],[ISO codes prefix])
 
89
fi
62
90
 
63
91
dnl
64
92
dnl Make sha1.c happy on big endian systems