diff options
-rw-r--r-- | Makefile | 16 | ||||
-rw-r--r-- | libintl/libintl-musl.c | 5 |
2 files changed, 17 insertions, 4 deletions
@@ -5,7 +5,16 @@ libdir=$(prefix)/lib sysconfdir=$(prefix)/etc m4dir=$(prefix)/share/gettext-tiny -LIBSRC = $(sort $(wildcard libintl/*.c)) +ifeq ($(LIBINTL), MUSL) + LIBSRC = libintl/libintl-musl.c + HEADERS = +else ifeq ($(LIBINTL), NONE) + LIBSRC = + HEADERS = +else + LIBSRC = libintl/libintl.c + HEADERS = libintl.h +endif PROGSRC = $(sort $(wildcard src/*.c)) PARSEROBJS = src/poparser.o src/StringEscape.o @@ -13,11 +22,10 @@ PROGOBJS = $(PROGSRC:.c=.o) LIBOBJS = $(LIBSRC:.c=.o) OBJS = $(PROGOBJS) $(LIBOBJS) - -HEADERS = libintl.h ALL_INCLUDES = $(HEADERS) - +ifneq ($(LIBINTL), NONE) ALL_LIBS=libintl.a +endif ALL_TOOLS=msgfmt msgmerge xgettext autopoint ALL_M4S=$(sort $(wildcard m4/*.m4)) diff --git a/libintl/libintl-musl.c b/libintl/libintl-musl.c new file mode 100644 index 0000000..eb00506 --- /dev/null +++ b/libintl/libintl-musl.c @@ -0,0 +1,5 @@ +#include <stdio.h> + +/* trick configure tests checking for gnu libintl, as in the copy included in gdb */ +const char *_nl_expand_alias () { return NULL; } +int _nl_msg_cat_cntr = 0; |