Browse Source

make it compile without locale support

Waldemar Brodkorb 14 years ago
parent
commit
df25a2fd07
3 changed files with 8 additions and 4 deletions
  1. 4 4
      config/Makefile
  2. 2 0
      config/conf.c
  3. 2 0
      config/mconf.c

+ 4 - 4
config/Makefile

@@ -44,16 +44,16 @@ MCONF_OBJS=$(patsubst %.c,%.o, $(MCONF_SRC))
 SHARED_OBJS=$(patsubst %.c,%.o, $(SHARED_SRC))
 
 conf: $(CONF_OBJS) $(SHARED_OBJS)
-	$(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@
+	$(HOSTCC) -DKBUILD_NO_NLS $(NATIVE_LDFLAGS) $^ -o $@
 
 mconf: $(MCONF_OBJS) $(SHARED_OBJS)
-	$(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@ $(LIBS)
+	$(HOSTCC) -DKBUILD_NO_NLS $(NATIVE_LDFLAGS) $^ -o $@ $(LIBS)
 
 $(CONF_OBJS): %.o : %.c $(SHARED_DEPS)
-	$(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@
+	$(HOSTCC) -DKBUILD_NO_NLS $(HOSTCFLAGS) -I. -c $< -o $@
 
 $(MCONF_OBJS): %.o : %.c $(SHARED_DEPS)
-	$(HOSTCC) $(HOSTCFLAGS) $(HOSTNCURSES) -I. -c $< -o $@
+	$(HOSTCC) -DKBUILD_NO_NLS $(HOSTCFLAGS) $(HOSTNCURSES) -I. -c $< -o $@
 
 glob.o: glob.c $(SHARED_DEPS)
 	$(HOSTCC) $(HOSTCFLAGS) -I. -c glob.c -o $@

+ 2 - 0
config/conf.c

@@ -435,9 +435,11 @@ int main(int ac, char **av)
 	const char *name;
 	struct stat tmpstat;
 
+#ifndef KBUILD_NO_NLS 
 	setlocale(LC_ALL, "");
 	bindtextdomain(PACKAGE, LOCALEDIR);
 	textdomain(PACKAGE);
+#endif
 
 	while ((opt = getopt(ac, av, "osdD:nmyrh")) != -1) {
 		switch (opt) {

+ 2 - 0
config/mconf.c

@@ -875,9 +875,11 @@ int main(int ac, char **av)
 	char *mode;
 	int res;
 
+#ifndef KBUILD_NO_NLS
 	setlocale(LC_ALL, "");
 	bindtextdomain(PACKAGE, LOCALEDIR);
 	textdomain(PACKAGE);
+#endif
 
 	conf_parse(av[1]);
 	conf_read(NULL);