summaryrefslogtreecommitdiff
blob: 7349f32ea20baaa84458b1a93d46f8ff22a5ddb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
diff -bur clamav-0.90.2/clamav-milter/clamav-milter.c clamav-0.90.2-nls/clamav-milter/clamav-milter.c
--- clamav-0.90.2/clamav-milter/clamav-milter.c	2007-04-12 18:35:17.000000000 +0200
+++ clamav-0.90.2-nls/clamav-milter/clamav-milter.c	2007-04-16 15:33:40.000000000 +0200
@@ -110,6 +110,7 @@
 
 #ifdef	C_LINUX
 #include <sys/sendfile.h>	/* FIXME: use sendfile on BSD not Linux */
+#ifdef	ENABLE_NLS
 #include <libintl.h>
 #include <locale.h>
 
@@ -122,7 +123,8 @@
 #define	_(s)	s
 #define	N_(s)	s
 
-#endif
+#endif /* ENABLE_NLS */
+#endif /* C_LINUX */
 
 #ifdef	USE_SYSLOG
 #include <syslog.h>
@@ -664,7 +666,7 @@
 	else
 		progname = "clamav-milter";
 
-#ifdef	C_LINUX
+#ifdef	ENABLE_NLS
 	setlocale(LC_ALL, "");
 	bindtextdomain(progname, DATADIR"/clamav-milter/locale");
 	textdomain(progname);
diff -bur clamav-0.90.2/configure.in clamav-0.90.2-nls/configure.in
--- clamav-0.90.2/configure.in	2007-04-13 01:10:37.000000000 +0200
+++ clamav-0.90.2-nls/configure.in	2007-04-16 15:33:40.000000000 +0200
@@ -160,6 +160,15 @@
     AC_CHECK_HEADER(dlfcn.h,[LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -ldl" ; AC_DEFINE(HAVE_NCORE,1,Support for NodalCore acceleration)], AC_MSG_WARN([****** NodalCore support disabled (no support for dlopen)]))
 fi
 
+AC_ARG_ENABLE(nls,
+    AC_HELP_STRING([--disable-nls], [disable nls support]),
+    [want_nls=$enableval], [want_nls=yes]
+)
+
+if test $want_nls = yes; then
+   CPPFLAGS="$CPPFLAGS -DENABLE_NLS"
+fi
+
 AC_ARG_ENABLE(dns,
     AC_HELP_STRING([--disable-dns], [disable support for database verification through DNS]),
     [want_dns=$enableval], [want_dns=yes]
diff -bur clamav-0.90.2/shared/getopt.c clamav-0.90.2-nls/shared/getopt.c
--- clamav-0.90.2/shared/getopt.c	2007-02-28 02:08:59.000000000 +0100
+++ clamav-0.90.2-nls/shared/getopt.c	2007-04-16 15:33:40.000000000 +0200
@@ -82,7 +82,7 @@
 
 #ifndef _
 /* This is for other GNU distributions with internationalized messages.  */
-# if defined HAVE_LIBINTL_H || defined _LIBC
+# if (defined(HAVE_LIBINTL_H) || defined(_LIBC)) && defined(ENABLE_NLS)
 #  include <libintl.h>
 #  ifndef _
 #   define _(msgid)	gettext (msgid)
diff -bur clamav-0.90.2/shared/output.c clamav-0.90.2-nls/shared/output.c
--- clamav-0.90.2/shared/output.c	2007-03-02 01:43:18.000000000 +0100
+++ clamav-0.90.2-nls/shared/output.c	2007-04-16 15:33:40.000000000 +0200
@@ -61,7 +61,7 @@
 pthread_mutex_t logg_mutex = PTHREAD_MUTEX_INITIALIZER;
 #endif
 
-#ifdef  C_LINUX
+#if defined(C_LINUX) && defined(ENABLE_NLS)
 #include <libintl.h>
 #include <locale.h>