path: root/mcon/U/d_gnugettext.U
diff options
Diffstat (limited to 'mcon/U/d_gnugettext.U')
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: Copyright (c) 2006, Christian Biere
+?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.
+?MAKE:d_gnugettext: Myread Setvar cat d_nls +cc +ccflags +ldflags +libs
+?MAKE: -pick add $@ %<
+?S: This variable conditionally defines HAS_GNU_GETTEXT
+?C: This symbol, if defined, indicates that GNU gettext() is available.
+?H:#$d_gnugettext HAS_GNU_GETTEXT /**/
+?F:!t.c !t
+?LINT:set d_gnugettext
+?LINT:usefile t t.c
+: determine whether we have GNU 'gettext()'
+echo " "
+case "$d_nls" in
+ 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;
+ 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"
+ ;;
+set d_gnugettext
+eval $setvar