summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2005-08-02 04:43:01 +0000
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2005-08-02 04:43:01 +0000
commit8b75f9bb6a09d54d634ff661655659951378aa2c (patch)
tree611f800f33ca919d37c724957fcc8c2b2bccb342 /m4
parente3f702e83a26468ee44f3f342a7a40a252f4603c (diff)
downloadlibrcc-8b75f9bb6a09d54d634ff661655659951378aa2c.tar.gz
librcc-8b75f9bb6a09d54d634ff661655659951378aa2c.tar.bz2
librcc-8b75f9bb6a09d54d634ff661655659951378aa2c.tar.xz
librcc-8b75f9bb6a09d54d634ff661655659951378aa2c.zip
Language autodetection
- rccConfigRecode function's are added - Language autodetection using aspell is added - Translation in 3 modes: "To English Language", "Skip English Translation", "Full" - Example2 to demonstrate translation possibilities
Diffstat (limited to 'm4')
-rw-r--r--m4/aspell.m444
1 files changed, 44 insertions, 0 deletions
diff --git a/m4/aspell.m4 b/m4/aspell.m4
new file mode 100644
index 0000000..164e534
--- /dev/null
+++ b/m4/aspell.m4
@@ -0,0 +1,44 @@
+# This file is part of GNOME Translate.
+#
+# Copyright (C) 2004 Jean-Yves Lefort.
+#
+# As a special exception to the GNOME Translate licensing terms,
+# Jean-Yves Lefort gives unlimited permission to copy, distribute and
+# modify this file.
+
+dnl AM_PATH_ASPELL([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl
+AC_DEFUN([AM_PATH_ASPELL],
+[ASPELL_CFLAGS=""
+ASPELL_LIBS="-laspell"
+
+ac_save_CFLAGS="$CFLAGS"
+ac_save_LIBS="$LIBS"
+CFLAGS="$CFLAGS $ASPELL_CFLAGS"
+LIBS="$LIBS $ASPELL_LIBS"
+
+AC_MSG_CHECKING([for Aspell])
+AC_RUN_IFELSE([
+#include <aspell.h>
+
+int main() {
+ new_aspell_config;
+
+ exit(0);
+}
+], [found=yes], [found=no], [found=yes])
+AC_MSG_RESULT($found)
+
+CFLAGS="$ac_save_CFLAGS"
+LIBS="$ac_save_LIBS"
+
+if test $found = yes; then
+ ifelse([$1],, :, [$1])
+else
+ ASPELL_CFLAGS=""
+ ASPELL_LIBS=""
+ ifelse([$2],, :, [$2])
+fi
+
+AC_SUBST(ASPELL_CFLAGS)
+AC_SUBST(ASPELL_LIBS)])