diff options
author | Manoj Srivastava <srivasta@golden-gryphon.com> | 2014-04-27 17:54:01 -0700 |
---|---|---|
committer | Manoj Srivastava <srivasta@golden-gryphon.com> | 2014-04-27 17:54:01 -0700 |
commit | 8f5e5726134ce5b4bd436b16f367796d851df553 (patch) | |
tree | 0ce2ad130721dcf917d7f81fb8495bf0a189d266 /mcon/U/d_gnugettext.U | |
parent | 02bf7be6fc0f798790ef5b2160bc89a77b909428 (diff) |
Imported Upstream version 3.5-36
Diffstat (limited to 'mcon/U/d_gnugettext.U')
-rw-r--r-- | mcon/U/d_gnugettext.U | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/mcon/U/d_gnugettext.U b/mcon/U/d_gnugettext.U new file mode 100644 index 0000000..6475738 --- /dev/null +++ b/mcon/U/d_gnugettext.U @@ -0,0 +1,54 @@ +?RCS: $Id: d_gnugettext.U 167 2013-05-08 17:58:00Z rmanfredi $ +?RCS: +?RCS: Copyright (c) 2006, Christian Biere +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_gnugettext: Myread Setvar cat d_nls +cc +ccflags +ldflags +libs +?MAKE: -pick add $@ %< +?S:d_gnugettext: +?S: This variable conditionally defines HAS_GNU_GETTEXT +?S:. +?C:HAS_GNU_GETTEXT: +?C: This symbol, if defined, indicates that GNU gettext() is available. +?C:. +?H:#$d_gnugettext HAS_GNU_GETTEXT /**/ +?H:. +?F:!t.c !t +?LINT:set d_gnugettext +?LINT:usefile t t.c +: determine whether we have GNU 'gettext()' +echo " " +case "$d_nls" in +"$define") + echo "Looking for GNU gettext()..." >&4 + $cat >t.c <<'EOC' +#include <libintl.h> +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings; +int main() +{ + bindtextdomain ("", ""); + return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings; +} +EOC + if $cc $ccflags $ldflags -o t t.c $libs >/dev/null 2>&1; then + echo "Yes, you have the GNU version." >&4 + val="$define" + else + echo "No, you don't have the GNU version." >&4 + val="$undef" + fi + ;; +*) + echo "You don't have NLS, you can't have GNU gettext()!" >&4 + val="$undef" + ;; +esac +set d_gnugettext +eval $setvar + |